def __parse_args(*args, **kwargs):
    """
    This parses input args and kwargs in a format that suits pip._internal.main.
    """
    l = []
    for v in args:
        if v not in l:
            l.append(str(v))
    for k, v in kwargs.items():
        k = '--' + k.replace('_', '-')
        if k not in l:
            l.append(k)
            if v is not True:
                l.append(str(v))
    return l
