def parse_distutils_args(args):
    # type: (List[str]) -> Dict[str, str]
    """Parse provided arguments, returning an object that has the
    matched arguments.

    Any unknown arguments are ignored.
    """
    result = {}
    for arg in args:
        try:
            _, match = _distutils_getopt.getopt(args=[arg])
        except DistutilsArgError:
            # We don't care about any other options, which here may be
            # considered unrecognized since our option list is not
            # exhaustive.
            pass
        else:
            result.update(match.__dict__)
    return result
Parse provided arguments, returning an object that has the
    matched arguments.

    Any unknown arguments are ignored.
    
product/gradle-plugin/src/main/python/pip/_internal/utils/distutils_args.py