def _patch_multiple(target, spec=None, create=False, spec_set=None,<EOL>autospec=None, new_callable=None, **kwargs):
if type(target) in (unicode, str):<EOL><INDENT>getter = lambda: _importer(target)<EOL><DEDENT>else:<EOL><INDENT>getter = lambda: target<EOL><DEDENT>if not kwargs:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>items = list(kwargs.items())<EOL>attribute, new = items[<NUM_LIT:0>]<EOL>patcher = _patch(<EOL>getter, attribute, new, spec, create, spec_set,<EOL>autospec, new_callable, {}<EOL>)<EOL>patcher.attribute_name = attribute<EOL>for attribute, new in items[<NUM_LIT:1>:]:<EOL><INDENT>this_patcher = _patch(<EOL>getter, attribute, new, spec, create, spec_set,<EOL>autospec, new_callable, {}<EOL>)<EOL>this_patcher.attribute_name = attribute<EOL>patcher.additional_patchers.append(this_patcher)<EOL><DEDENT>return patcher<EOL>
Perform multiple patches in a single call. It takes the object to be
    patched (either as an object or a string to fetch the object by importing)
    and keyword arguments for the patches::

        with patch.multiple(settings, FIRST_PATCH='one', SECOND_PATCH='two'):
            ...

    Use `DEFAULT` as the value if you want `patch.multiple` to create
    mocks for you. In this case the created mocks are passed into a decorated
    function by keyword, and a dictionary is returned when `patch.multiple` is
    used as a context manager.

    `patch.multiple` can be used as a decorator, class decorator or a context
    manager. The arguments `spec`, `spec_set`, `create`,
    `autospec` and `new_callable` have the same meaning as for `patch`. These
    arguments will be applied to *all* patches done by `patch.multiple`.

    When used as a class decorator `patch.multiple` honours `patch.TEST_PREFIX`
    for choosing which methods to wrap.