code: def test_is_definition(
      code, name_index, is_definition, include_setitem
  ):
      module = parse(code, version="3.8")
      name = module.get_first_leaf()
      while True:
          if name.type == "name":
              if name_index == 0:
                  break
              name_index -= 1
          name = name.get_next_leaf()
  
      assert (
          name.is_definition(include_setitem=include_setitem)
          == is_definition
      )
  
imports: from textwrap import dedent
  import pytest
  from parso import parse
  from parso.python import tree
label_desc: Use image node_id 14 for calling a global function with example usage: test_is_definition(code, name_index, is_definition, include_setitem) without return types