code: def _needs_add_docstring(obj):
      """
      Returns true if the only way to set the docstring of `obj` from python is
      via add_docstring.
  
      This function errs on the side of being overly conservative.
      """
      Py_TPFLAGS_HEAPTYPE = 1 << 9
  
      if isinstance(
          obj, (types.FunctionType, types.MethodType, property)
      ):
          return False
  
      if isinstance(obj, type) and obj.__flags__ & Py_TPFLAGS_HEAPTYPE:
          return False
  
      return True
  
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 7 for calling a global function with example usage: _needs_add_docstring(obj) and returns: True, False, False