class_docstr: *Definition* objects are returned from :meth:`api.Script.goto_assignments`
  or :meth:`api.Script.goto_definitions`.
class_docstr_tok: ["*","Definition","*","objects","are","returned","from",":","meth",":","`","api.Script.goto_assignments","`","or",":","meth",":","`","api.Script.goto_definitions","`","."]
docstr: Returns True, if defined as a name in a statement, function or class.
  Returns False, if it's a reference to such a definition.
docstr_tok: ["Returns","True",",","if","defined","as","a","name","in","a","statement",",","function","or","class",".","Returns","False",",","if","it","'s","a","reference","to","such","a","definition","."]
code: def is_definition(self):
      """
      Returns True, if defined as a name in a statement, function or class.
      Returns False, if it's a reference to such a definition.
      """
      if self._name.tree_name is None:
          return True
      else:
          return self._name.tree_name.is_definition()
  
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 5 for calling the Definition obj's underlying member method code with example usage: obj.is_definition() and returns: True, self