r"""
    Builds the argument docstring

    Args:
        argname_list (list): names
        argtype_list (list): types
        argdesc_list (list): descriptions
        ismethod (bool): if generating docs for a method
        va_name (Optional[str]): varargs name
        kw_name (Optional[str]): kwargs name
        kw_keys (Optional[list]): accepted kwarg keys

    Returns:
        str: arg_docstr

    CommandLine:
        python -m utool.util_autogen make_args_docstr

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_autogen import *  # NOQA
        >>> argname_list = ['argname_list', 'argtype_list', 'argdesc_list']
        >>> argtype_list = ['list', 'list', 'list']
        >>> argdesc_list = ['names', 'types', 'descriptions']
        >>> va_name = 'args'
        >>> kw_name = 'kwargs'
        >>> kw_keys = ['']
        >>> ismethod = False
        >>> arg_docstr = make_args_docstr(argname_list, argtype_list,
        >>>                               argdesc_list, ismethod, va_name,
        >>>                               kw_name, kw_keys)
        >>> result = str(arg_docstr)
        >>> print(result)
        argname_list (list): names
        argtype_list (list): types
        argdesc_list (list): descriptions
        *args:
        **kwargs:

def make_args_docstr(argname_list, argtype_list, argdesc_list, ismethod,
                     va_name=None, kw_name=None, kw_keys=[]):
    r"""
    Builds the argument docstring

    Args:
        argname_list (list): names
        argtype_list (list): types
        argdesc_list (list): descriptions
        ismethod (bool): if generating docs for a method
        va_name (Optional[str]): varargs name
        kw_name (Optional[str]): kwargs name
        kw_keys (Optional[list]): accepted kwarg keys

    Returns:
        str: arg_docstr

    CommandLine:
        python -m utool.util_autogen make_args_docstr

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_autogen import *  # NOQA
        >>> argname_list = ['argname_list', 'argtype_list', 'argdesc_list']
        >>> argtype_list = ['list', 'list', 'list']
        >>> argdesc_list = ['names', 'types', 'descriptions']
        >>> va_name = 'args'
        >>> kw_name = 'kwargs'
        >>> kw_keys = ['']
        >>> ismethod = False
        >>> arg_docstr = make_args_docstr(argname_list, argtype_list,
        >>>                               argdesc_list, ismethod, va_name,
        >>>                               kw_name, kw_keys)
        >>> result = str(arg_docstr)
        >>> print(result)
        argname_list (list): names
        argtype_list (list): types
        argdesc_list (list): descriptions
        *args:
        **kwargs:

    """
    import utool as ut
    if ismethod:
        # Remove self from the list
        argname_list = argname_list[1:]
        argtype_list = argtype_list[1:]
        argdesc_list = argdesc_list[1:]

    argdoc_list = [arg + ' (%s): %s' % (_type, desc)
                   for arg, _type, desc in zip(argname_list, argtype_list, argdesc_list)]

    # Add in varargs and kwargs
    # References:
    # http://www.sphinx-doc.org/en/stable/ext/example_google.html#example-google
    if va_name is not None:
        argdoc_list.append('*' + va_name + ':')
    if kw_name is not None:
        import textwrap
        prefix = '**' + kw_name + ': '
        wrapped_lines = textwrap.wrap(', '.join(kw_keys), width=70 - len(prefix))
        sep = '\n' + (' ' * len(prefix))
        kw_keystr = sep.join(wrapped_lines)
        argdoc_list.append((prefix + kw_keystr).strip())

    # align?
    align_args = False
    if align_args:
        argdoc_aligned_list = ut.align_lines(argdoc_list, character='(')
        arg_docstr = '\n'.join(argdoc_aligned_list)
    else:
        arg_docstr = '\n'.join(argdoc_list)
    return arg_docstr