code: def load_model(name) -> torch.nn.Module:
      classes = [x for x in dir(models) if isclass(getattr(models, x))]
      try:
          assert name in classes
      except:
          print("#E#Model of given name does not exist.")
          sys.exit(0)
  
      model = getattr(models, name)()
      print(f"#IN#{model}")
  
      return model
  
imports: from inspect import isclass
  import dig.xgraph.models.models
  import torch
  import sys
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: load_model(name) and returns: model