The key here is once you get a reference to the tabs workspace, you can call the Hide method which then accepts two parameters, the Smart Part ID to show or hide, and a Boolean parameter. The second Boolean parameter is set to True to hide and False to not hide. Note, that since this code runs after the tabs are actually loaded onto the page, the tab you are showing or hiding needs to be present as a loaded smart part.