code: def get_discriminator(cfg, is_temp=False, model_path=None):
      if cfg.NETWORK.USE_SIMPLE_MODEL:
          discriminator = SimpleDiscriminator(
              spectral_norm=cfg.NETWORK.DIS_USE_SPECTRAL_NORM,
              use_bn=cfg.NETWORK.DIS_USE_BN,
          )
      else:
          discriminator = Discriminator(cfg, is_temp=is_temp)
      if model_path is None and not cfg.NETWORK.USE_SIMPLE_MODEL:
          init_weights(discriminator)
      elif model_path is not None:
          state_dict = torch.load(model_path)["state_dict"]
          discriminator.load_state_dict(state_dict)
      return discriminator
  
imports: import torch
  import torch.nn
  import numpy
  import pickle
  from lib.utils.misc import init_weights, load_pickle
  from lib.utils.utils import Transform3D, transform_3d, transform_3d_v2
  from lib.models.building_blocks import ResBlock
  from lib.models.scaler import get_scaler
  from lib.models.rotater import get_rotater
  from lib.models.lifter import get_lifter_before, get_lifter_after
  from lib.models.simple_model import LinearModelBefore, LinearModelAfter, Linear
  from lib.utils.utils import rotate, rotate2
label_desc: Use image node_id 2 for calling a global function with example usage: get_discriminator(cfg, is_temp, model_path) and returns: discriminator