code: def patch(target, *args, **kwargs):
      """A wrapper of mock.patch which appends wraps argument.
  
      .. note::
  
         Unbound methods are not supported as ``wraps`` argument.
  
      Args:
          target(str): Full name of target object.
          wraps: Wrapping object which will be passed to ``mock.patch`` as
              ``wraps`` argument.
              If omitted, the object specified by ``target`` is used.
          *args: Passed to ``mock.patch``.
          **kwargs: Passed to ``mock.patch``.
  
      """
      _check_mock_available()
      try:
          wraps = kwargs.pop("wraps")
      except KeyError:
          wraps = _import_object_from_name(target)
      return mock.patch(target, *args, wraps=wraps, **kwargs)
  
file_path: chainer/chainer/testing/helper.py
imports: import contextlib
  import sys
  import unittest
  import warnings
  import pkg_resources
label_desc: Use image node_id 6 for calling a global function with example usage: patch(target) and returns: mock