def combine_kwargs(**kwargs):
combined_kwargs = []<EOL>for kw, arg in kwargs.items():<EOL><INDENT>if isinstance(arg, dict):<EOL><INDENT>for k, v in arg.items():<EOL><INDENT>for tup in flatten_kwarg(k, v):<EOL><INDENT>combined_kwargs.append(('<STR_LIT>'.format(kw, tup[<NUM_LIT:0>]), tup[<NUM_LIT:1>]))<EOL><DEDENT><DEDENT><DEDENT>elif is_multivalued(arg):<EOL><INDENT>for i in arg:<EOL><INDENT>for tup in flatten_kwarg('<STR_LIT>', i):<EOL><INDENT>combined_kwargs.append(('<STR_LIT>'.format(kw, tup[<NUM_LIT:0>]), tup[<NUM_LIT:1>]))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>combined_kwargs.append((text_type(kw), arg))<EOL><DEDENT><DEDENT>return combined_kwargs<EOL>
Flatten a series of keyword arguments from complex combinations of
dictionaries and lists into a list of tuples representing
properly-formatted parameters to pass to the Requester object.

:param kwargs: A dictionary containing keyword arguments to be
    flattened into properly-formatted parameters.
:type kwargs: dict

:returns: A list of tuples that represent flattened kwargs. The
    first element is a string representing the key. The second
    element is the value.
:rtype: `list` of `tuple`