class_docstr: Use easy_install to install the package, w/dependencies
class_docstr_tok: ["Use","easy_install","to","install","the","package",",","w\/dependencies"]
docstr: Attempt to detect whether run() was called from setup() or by another
  command.  If called by setup(), the parent caller will be the
  'run_command' method in 'distutils.dist', and *its* caller will be
  the 'run_commands' method.  If called any other way, the
  immediate caller *might* be 'run_command', but it won't have been
  called by 'run_commands'. Return True in that case or if a call stack
  is unavailable. Return False otherwise.
docstr_tok: ["Attempt","to","detect","whether","run","(",")","was","called","from","setup","(",")","or","by","another","command",".","If","called","by","setup","(",")",",","the","parent","caller","will","be","the","'run_command","'","method","in","'distutils.dist","'",",","and","*","its","*","caller","will","be","the","'run_commands","'","method",".","If","called","any","other","way",",","the","immediate","caller","*","might","*","be","'run_command","'",",","but","it","wo","n't","have","been","called","by","'run_commands","'",".","Return","True","in","that","case","or","if","a","call","stack","is","unavailable",".","Return","False","otherwise","."]
code: def _called_from_setup(run_frame):
      """
      Attempt to detect whether run() was called from setup() or by another
      command.  If called by setup(), the parent caller will be the
      'run_command' method in 'distutils.dist', and *its* caller will be
      the 'run_commands' method.  If called any other way, the
      immediate caller *might* be 'run_command', but it won't have been
      called by 'run_commands'. Return True in that case or if a call stack
      is unavailable. Return False otherwise.
      """
      if run_frame is None:
          msg = "Call stack not available. bdist_* commands may fail."
          warnings.warn(msg)
          if platform.python_implementation() == "IronPython":
              msg = "For best results, pass -X:Frames to enable call stack."
              warnings.warn(msg)
          return True
      res = inspect.getouterframes(run_frame)[2]
      (caller,) = res[:1]
      info = inspect.getframeinfo(caller)
      caller_module = caller.f_globals.get("__name__", "")
      return (
          caller_module == "distutils.dist"
          and info.function == "run_commands"
      )
  
file_path: catboost/contrib/python/setuptools/py2/setuptools/command/install.py
imports: from distutils.errors import DistutilsArgError
  import inspect
  import glob
  import warnings
  import platform
  import distutils.command.install
  import setuptools
label_desc: Use image node_id 5 for calling the install obj's underlying member method code with example usage: obj._called_from_setup(run_frame) and returns: unknown, True