code: def get_module(cls, op, required=False, op_kwarg=None, **kwargs):
      if op is None and not required or isinstance(op, cls):
          return op
      elif required:
          return cls(**kwargs)
      elif isinstance(op, six.string_types):
          if op_kwarg is not None:
              kwargs[op_kwarg] = op
              return cls(**kwargs)
          else:
              return cls(op, **kwargs)
      elif six.callable(op) and not isinstance(op, torch.nn.Module):
          return dm.modules.LazyModuleFn(op)
      else:
          raise ValueError(
              str(cls)
              + " arg must be a valid string, a "
              + str(cls)
              + " object, or a "
              "callable."
          )
  
file_path: deepmatcher/deepmatcher/models/_utils.py
imports: import pdb
  import six
  import deepmatcher
  import torch
  from ..batch import AttrTensor
label_desc: Use image node_id 2 for calling a global function with example usage: get_module(cls, op, required, op_kwarg) and returns: op, cls, cls, cls, dm