def _patch_object(<EOL>target, attribute, new=DEFAULT, spec=None,<EOL>create=False, spec_set=None, autospec=None,<EOL>new_callable=None, **kwargs<EOL>):
getter = lambda: target<EOL>return _patch(<EOL>getter, attribute, new, spec, create,<EOL>spec_set, autospec, new_callable, kwargs<EOL>)<EOL>
patch.object(target, attribute, new=DEFAULT, spec=None, create=False,
             spec_set=None, autospec=None, new_callable=None, **kwargs)

patch the named member (`attribute`) on an object (`target`) with a mock
object.

`patch.object` can be used as a decorator, class decorator or a context
manager. Arguments `new`, `spec`, `create`, `spec_set`,
`autospec` and `new_callable` have the same meaning as for `patch`. Like
`patch`, `patch.object` takes arbitrary keyword arguments for configuring
the mock object it creates.

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