<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalize_path(path, filetype=FILE):
 """Takes a path and a filetype, verifies existence and type, and returns absolute path. """

    if not path:
        raise ValueError('"{0}" is not a valid path.'.format(path))
    if not os.path.exists(path):
        raise ValueError('"{0}" does not exist.'.format(path))
    if filetype == FILE and not os.path.isfile(path):
        raise ValueError('"{0}" is not a file.'.format(path))
    elif filetype == DIR and not os.path.isdir(path):
        raise ValueError('"{0}" is not a dir.'.format(path))

    return os.path.abspath(path)