def get_function_args(func, no_self=False, no_varargs=False):
par_dict = signature(func).parameters<EOL>pos = lambda x: x.kind == Parameter.VAR_POSITIONAL<EOL>kw = lambda x: x.kind == Parameter.VAR_KEYWORD<EOL>opts = ["<STR_LIT>", "<STR_LIT:*>", "<STR_LIT>"]<EOL>args = [<EOL>"<STR_LIT>".format(prefix=opts[pos(value) + <NUM_LIT:2> * kw(value)], arg=par)<EOL>for par, value in par_dict.items()<EOL>]<EOL>self_filtered_args = (<EOL>args if not args else (args[<NUM_LIT:1> if (args[<NUM_LIT:0>] == "<STR_LIT>") and no_self else <NUM_LIT:0> :])<EOL>)<EOL>pos = lambda x: (len(x) > <NUM_LIT:1>) and (x[<NUM_LIT:0>] == "<STR_LIT:*>") and (x[<NUM_LIT:1>] != "<STR_LIT:*>")<EOL>kw = lambda x: (len(x) > <NUM_LIT:2>) and (x[:<NUM_LIT:2>] == "<STR_LIT>")<EOL>varargs_filtered_args = [<EOL>arg<EOL>for arg in self_filtered_args<EOL>if (not no_varargs) or all([no_varargs, not pos(arg), not kw(arg)])<EOL>]<EOL>return tuple(varargs_filtered_args)<EOL>
Return tuple of the function argument names in the order of the function signature.

:param func: Function
:type  func: function object

:param no_self: Flag that indicates whether the function argument *self*,
                if present, is included in the output (False) or not (True)
:type  no_self: boolean

:param no_varargs: Flag that indicates whether keyword arguments are
                   included in the output (True) or not (False)
:type  no_varargs: boolean

:rtype: tuple

For example:

    >>> import pexdoc.pinspect
    >>> class MyClass(object):
    ...     def __init__(self, value, **kwargs):
    ...         pass
    ...
    >>> pexdoc.pinspect.get_function_args(MyClass.__init__)
    ('self', 'value', '**kwargs')
    >>> pexdoc.pinspect.get_function_args(
    ...     MyClass.__init__, no_self=True
    ... )
    ('value', '**kwargs')
    >>> pexdoc.pinspect.get_function_args(
    ...     MyClass.__init__, no_self=True, no_varargs=True
    ... )
    ('value',)
    >>> pexdoc.pinspect.get_function_args(
    ...     MyClass.__init__, no_varargs=True
    ... )
    ('self', 'value')