def dist_in_usersite(dist):
    # type: (Distribution) -> bool
    """
    Return True if given Distribution is installed in user site.
    """
    return dist_location(dist).startswith(normalize_path(user_site))

    Return True if given Distribution is installed in user site.
    
product/gradle-plugin/src/main/python/pip/_internal/utils/misc.py