<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dirname(self, path):
 """Returns the full path to the parent directory of the specified file 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)