code: def split_local_path(self, local_file):
          
          abspath = os.path.abspath(local_file)
          if abspath.find(self.workdir) >= 0:
              relpath = abspath.replace(self.workdir, '')[1:]
              basename = os.path.basename(relpath)
              dirname = os.path.dirname(relpath)
          else:
              basename = os.path.basename(local_file)
              dirname = ''
          return (dirname, basename)
docs: Split the local path into a directory name and a file name
  
          If local_file is in self.workdir or a subdirectory of it,
          the directory will consist of the relative path from workdir.
  
          If local_file is not in self.workdir, directory will be empty.
  
          Returns (dirname, basename)