code: def get_names_of_node(node):
      try:
          children = node.children
      except AttributeError:
          if node.type == "name":
              return [node]
          else:
              return []
      else:
          return list(
              chain.from_iterable(
                  get_names_of_node(c) for c in children
              )
          )
  
imports: import copy
  import sys
  import re
  import os
  from itertools import chain
  from contextlib import contextmanager
  from parso.python import tree
  from jedi._compatibility import unicode
  from jedi.parser_utils import get_parent_scope
label_desc: Use image node_id 5 for calling a global function with example usage: get_names_of_node(node) and returns: list, list, list