docstr: Checks for both __getattr__ and __getattribute__ methods
docstr_tok: ["Checks","for","both","__getattr__","and","__getattribute__","methods"]
code: def _check_getattr(self, inst):
      """Checks for both __getattr__ and __getattribute__ methods"""
      # str is important, because it shouldn't be `Name`!
      name = compiled.create_simple_object(
          self._evaluator, self._string_name
      )
  
      # This is a little bit special. `__getattribute__` is in Python
      # executed before `__getattr__`. But: I know no use case, where
      # this could be practical and where Jedi would return wrong types.
      # If you ever find something, let me know!
      # We are inversing this, because a hand-crafted `__getattribute__`
      # could still call another hand-crafted `__getattr__`, but not the
      # other way around.
      names = inst.get_function_slot_names(
          "__getattr__"
      ) or inst.get_function_slot_names("__getattribute__")
      return inst.execute_function_slots(names, name)
  
imports: from parso.python import tree
  from parso.tree import search_ancestor
  from jedi import debug
  from jedi import settings
  from jedi.evaluate.context import AbstractInstanceContext
  from jedi.evaluate import compiled
  from jedi.evaluate import analysis
  from jedi.evaluate import flow_analysis
  from jedi.evaluate.arguments import TreeArguments
  from jedi.evaluate import helpers
  from jedi.evaluate.context import iterable
  from jedi.evaluate.filters import get_global_filters, TreeNameDefinition
  from jedi.evaluate.base_context import ContextSet
  from jedi.parser_utils import is_scope, get_parent_scope
label_desc: Use image node_id 6 for calling the NameFinder obj's underlying member method code with example usage: obj._check_getattr(inst) and returns: inst