code: def get_python_classes(nn_root):
      exclude_classes = set(["Criterion"])
      raw_classes = []
      python_nn_layers = [
          join(nn_root, name)
          for name in os.listdir(nn_root)
          if isfile(join(nn_root, name))
          and name.endswith("py")
          and "__" not in name
      ]  # noqa
      for p in python_nn_layers:
          with open(p) as f:
              raw_classes.extend(
                  [
                      line
                      for line in f.readlines()
                      if line.startswith("class")
                  ]
              )  # noqa
      classes = [name.split()[1].split("(")[0] for name in raw_classes]
      return set(
          [name for name in classes if name not in exclude_classes]
      )
  
imports: import os
  import re
  from os.path import isfile, join
label_desc: Use image node_id 3 for calling a global function with example usage: get_python_classes(nn_root) and returns: set