(path: str)
return path
Given a windows path, prepare it for use by making sure it is absolute
    and normalized.
Given a windows path, prepare it for use by making sure it is absolute
    and normalized.
Given a windows path prepare it for use by making sure it is absolute and normalized .
def _win_prepare_path(path: str) -> str:
    """Given a windows path, prepare it for use by making sure it is absolute
    and normalized.
    """
    path = os.path.normpath(path)

    # if a path starts with '\', splitdrive() on it will return '' for the
    # drive, but the prefix requires a drive letter. So let's add the drive
    # letter back in.
    # Unless it starts with '\\'. In that case, the path is a UNC mount point
    # and splitdrive will be fine.
    if not path.startswith('\\\\') and path.startswith('\\'):
        curdrive = os.path.splitdrive(os.getcwd())[0]
        path = curdrive + path

    # now our path is either an absolute UNC path or relative to the current
    # directory. If it's relative, we need to make it absolute or the prefix
    # won't work. `ntpath.abspath` allegedly doesn't always play nice with long
    # paths, so do this instead.
    if not os.path.splitdrive(path)[0]:
        path = os.path.join(os.getcwd(), path)

    return path
def _win_prepare_path ( path : str ) -> str : path = os . path . normpath ( path ) # if a path starts with '\', splitdrive() on it will return '' for the # drive, but the prefix requires a drive letter. So let's add the drive # letter back in. # Unless it starts with '\\'. In that case, the path is a UNC mount point # and splitdrive will be fine. if not path . startswith ( '\\\\' ) and path . startswith ( '\\' ) : curdrive = os . path . splitdrive ( os . getcwd ( ) ) [ 0 ] path = curdrive + path # now our path is either an absolute UNC path or relative to the current # directory. If it's relative, we need to make it absolute or the prefix # won't work. `ntpath.abspath` allegedly doesn't always play nice with long # paths, so do this instead. if not os . path . splitdrive ( path ) [ 0 ] : path = os . path . join ( os . getcwd ( ) , path ) return path