code: def getattr_static(obj, attr, default=_sentinel):
      """Retrieve attributes without triggering dynamic lookup via the
      descriptor protocol,  __getattr__ or __getattribute__.
  
      Note: this function may not be able to retrieve all attributes
      that getattr can fetch (like dynamically created attributes)
      and may find attributes that getattr can't (like descriptors
      that raise AttributeError). It can also return descriptor objects
      instead of instance members in some cases. See the
      documentation for details.
  
      Returns a tuple `(attr, is_get_descriptor)`. is_get_descripter means that
      the attribute is a descriptor that has a `__get__` attribute.
      """
      instance_result = _sentinel
      if not _is_type(obj):
          klass = _get_type(obj)
          dict_attr = _shadowed_dict(klass)
          if (
              dict_attr is _sentinel
              or type(dict_attr) is types.MemberDescriptorType
          ):
              instance_result = _check_instance(obj, attr)
      else:
          klass = obj
  
      klass_result = _check_class(klass, attr)
  
      if (
          instance_result is not _sentinel
          and klass_result is not _sentinel
      ):
          if _safe_hasattr(
              klass_result, "__get__"
          ) and _safe_is_data_descriptor(klass_result):
              # A get/set descriptor has priority over everything.
              return klass_result, True
  
      if instance_result is not _sentinel:
          return instance_result, False
      if klass_result is not _sentinel:
          return klass_result, _safe_hasattr(klass_result, "__get__")
  
      if obj is klass:
          # for types we check the metaclass too
          for entry in _static_getmro(type(klass)):
              if _shadowed_dict(type(entry)) is _sentinel:
                  try:
                      return entry.__dict__[attr], False
                  except KeyError:
                      pass
      if default is not _sentinel:
          return default, False
      raise AttributeError(attr)
  
file_path: catboost/contrib/python/jedi/py3/jedi/evaluate/compiled/getattr_static.py
imports: import types
  from jedi._compatibility import py_version
label_desc: Use image node_id 8 for calling a global function with example usage: getattr_static(obj, attr, default) and returns: instance_result,  False, klass_result,  _safe_hasattr, default,  False, klass_result,  True, entry,  False