code: def ast_name(node):
      if isinstance(node, ast.Name):
          return node.id
      elif isinstance(node, ast.Attribute):
          return node.attr
      else:
          return None
  
imports: from collections import OrderedDict, deque
  from datetime import date, time, datetime
  from decimal import Decimal
  from fractions import Fraction
  import ast
  import enum
  import typing
label_desc: Use image node_id 7 for calling a global function with example usage: ast_name(node) and returns: node, node, None