def METHOD_NAME(self, path: str) -> str:
    '''
    Transform the path to an absolute path
    :param str path: The path to transform to an absolute path
    :return: The absolute path to the file.
    '''
    if not path.startswith(os.path.sep) or path.startswith('~'):
        path = os.path.expanduser(os.path.join(self.base_path, path))
    return path