<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split_local_path(self, local_file):
 """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) """

        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)