code: def _add_docstring(obj, doc, warn_on_python):
      if warn_on_python and not _needs_add_docstring(obj):
          warnings.warn(
              "add_newdoc was used on a pure-python object {}. "
              "Prefer to attach it directly to the source.".format(obj),
              UserWarning,
              stacklevel=3,
          )
      try:
          add_docstring(obj, doc)
      except Exception:
          pass
  
file_path: catboost/contrib/python/numpy/py3/numpy/core/function_base.py
imports: import functools
  import warnings
  import operator
  import types
  import numpy
  from .None import numeric
  from .numeric import result_type, NaN, asanyarray, ndim
  from numpy.core.multiarray import add_docstring
  from numpy.core import overrides
label_desc: Use image node_id 8 for calling a global function with example usage: _add_docstring(obj, doc, warn_on_python) without return types