docstr: Raises an ``AttributeError``if the definition is not callable.
  Otherwise returns a list of `Definition` that represents the params.
docstr_tok: ["Raises","an","``","AttributeError","``","if","the","definition","is","not","callable",".","Otherwise","returns","a","list","of","`","Definition","`","that","represents","the","params","."]
code: def params(self):
      """
      Raises an ``AttributeError``if the definition is not callable.
      Otherwise returns a list of `Definition` that represents the params.
      """
  
      def get_param_names(context):
          param_names = []
          if context.api_type == "function":
              param_names = list(context.get_param_names())
              if isinstance(context, instance.BoundMethod):
                  param_names = param_names[1:]
          elif isinstance(
              context, (instance.AbstractInstanceContext, ClassContext)
          ):
              if isinstance(context, ClassContext):
                  search = "__init__"
              else:
                  search = "__call__"
              names = context.get_function_slot_names(search)
              if not names:
                  return []
  
              # Just take the first one here, not optimal, but currently
              # there's no better solution.
              inferred = names[0].infer()
              param_names = get_param_names(next(iter(inferred)))
              if isinstance(context, ClassContext):
                  param_names = param_names[1:]
              return param_names
          elif isinstance(context, compiled.CompiledObject):
              return list(context.get_param_names())
          return param_names
  
      followed = list(self._name.infer())
      if not followed or not hasattr(followed[0], "py__call__"):
          raise AttributeError("There are no params defined on this.")
      context = followed[0]  # only check the first one.
  
      return [
          Definition(self._evaluator, n)
          for n in get_param_names(context)
      ]
  
imports: import re
  from parso.python.tree import search_ancestor
  from jedi import settings
  from jedi.evaluate.utils import ignored, unite
  from jedi.cache import memoize_method
  from jedi.evaluate import imports
  from jedi.evaluate import compiled
  from jedi.evaluate.imports import ImportName
  from jedi.evaluate.context import instance
  from jedi.evaluate.context import ClassContext, FunctionExecutionContext
  from jedi.api.keywords import KeywordName
label_desc: Use image node_id 14 for calling the BaseDefinition obj's underlying member method code with example usage: obj.params() and returns: unknown, param_names, param_names, list, list