code: def get_gast_version():
      """Gast exports `__version__` from 0.5.3 onwards, we need to look it up in a different way."""
      if hasattr(gast, "__version__"):
          return gast.__version__
      try:
          import pkg_resources
  
          return pkg_resources.get_distribution("gast").version
      except pkg_resources.DistributionNotFound:
          # Older gast had 'Str', check for the oldest supported version
          if hasattr(gast, "Str"):
              return "0.2"
          else:
              try:
                  # Try to call it with 3 arguments, to differentiate between 0.5+ and earlier.
                  gast.Assign(None, None, None)
              except AssertionError as e:
                  if (
                      "Bad argument number for Assign: 3, expecting 2"
                      in str(e)
                  ):
                      return "0.4"
              return "0.5"
  
file_path: DALI/dali/python/nvidia/dali/_autograph/pyct/gast_util.py
imports: import functools
  import gast
  from distutils.version import LooseVersion
label_desc: Use image node_id 1 for calling a global function with example usage: get_gast_version() and returns: gast, pkg_resources, str, str, str