code: def get_annotations(obj):
      if sys.version_info < (3, 10):
          return getattr(obj, "__annotations__", {})
      # In Python-3.10+ it is recommended to use inspect.get_annotations
      # See https://docs.python.org/3.10/howto/annotations.html
      # But also, in 3.10 annotations from base class are not inherited
      # by unannotated derived one, so they must be manually extracted
      annotations = inspect.get_annotations(obj)
      if annotations:
          return annotations
  
      def get_cls_annotations(cls):
          cls_annotations = inspect.get_annotations(cls)
          if cls_annotations:
              return cls_annotations
          for base in cls.__bases__:
              cls_annotations = get_cls_annotations(base)
              if cls_annotations:
                  return cls_annotations
          return {}
  
      cls = obj if isinstance(obj, type) else type(obj)
      return get_cls_annotations(cls)
  
imports: import collections
  import functools
  import inspect
  import sys
  import textwrap
  import types
  import warnings
  from typing import Dict, List, Set, Type
  import torch
  import torch._jit_internal
  from torch._sources import fake_range
  from torch.jit._builtins import _find_builtin
  from torch.jit._check import AttributeTypeIsSupportedChecker
  from torch.jit._state import _add_script_class, _get_script_class, _python_cu
  from torch.jit.frontend import get_class_properties, get_default_args, get_jit_class_def, get_jit_def
  from torch.nn import Module
label_desc: Use image node_id 7 for calling a global function with example usage: get_annotations(obj) and returns: get_cls_annotations, getattr, annotations, dict, cls_annotations, cls_annotations