def validate_axis_style_args(data, args, kwargs, arg_name, method_name):
<EOL>out = {}<EOL>if '<STR_LIT>' in kwargs and any(x in kwargs for x in data._AXIS_NUMBERS):<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise TypeError(msg)<EOL><DEDENT>if arg_name in kwargs:<EOL><INDENT>if args:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>".format(method_name, arg_name))<EOL>raise TypeError(msg)<EOL><DEDENT>axis = data._get_axis_name(kwargs.get('<STR_LIT>', <NUM_LIT:0>))<EOL>out[axis] = kwargs[arg_name]<EOL><DEDENT>for k, v in kwargs.items():<EOL><INDENT>try:<EOL><INDENT>ax = data._get_axis_name(k)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>out[ax] = v<EOL><DEDENT><DEDENT>if len(args) == <NUM_LIT:0>:<EOL><INDENT>pass  <EOL><DEDENT>elif len(args) == <NUM_LIT:1>:<EOL><INDENT>axis = data._get_axis_name(kwargs.get('<STR_LIT>', <NUM_LIT:0>))<EOL>out[axis] = args[<NUM_LIT:0>]<EOL><DEDENT>elif len(args) == <NUM_LIT:2>:<EOL><INDENT>if '<STR_LIT>' in kwargs:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise TypeError(msg)<EOL><DEDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>warnings.warn(msg.format(method_name=method_name,), FutureWarning,<EOL>stacklevel=<NUM_LIT:4>)<EOL>out[data._AXIS_NAMES[<NUM_LIT:0>]] = args[<NUM_LIT:0>]<EOL>out[data._AXIS_NAMES[<NUM_LIT:1>]] = args[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise TypeError(msg.format(arg_name))<EOL><DEDENT>return out<EOL>
Argument handler for mixed index, columns / axis functions

    In an attempt to handle both `.method(index, columns)`, and
    `.method(arg, axis=.)`, we have to do some bad things to argument
    parsing. This translates all arguments to `{index=., columns=.}` style.

    Parameters
    ----------
    data : DataFrame or Panel
    args : tuple
        All positional arguments from the user
    kwargs : dict
        All keyword arguments from the user
    arg_name, method_name : str
        Used for better error messages

    Returns
    -------
    kwargs : dict
        A dictionary of keyword arguments. Doesn't modify ``kwargs``
        inplace, so update them with the return value here.

    Examples
    --------
    >>> df._validate_axis_style_args((str.upper,), {'columns': id},
    ...                              'mapper', 'rename')
    {'columns': <function id>, 'index': <method 'upper' of 'str' objects>}

    This emits a warning
    >>> df._validate_axis_style_args((str.upper, id), {},
    ...                              'mapper', 'rename')
    {'columns': <function id>, 'index': <method 'upper' of 'str' objects>}