code: def dirname(self, path):
          
          if self.is_ssh(path):
              remotepath = self._get_remote(path)
              remotedir = os.path.dirname(remotepath)
              return self._get_tramp_path(remotedir)
          else:
              return os.path.dirname(path)
docs: Returns the full path to the parent directory of the specified
          file path.