code: def testInitWithCfgOverwrite(self):
      cfg = get_cfg()
      cfg.ARG1 = 1
      cfg.ARG2 = 999  # wrong config
      with self.assertRaises(AssertionError):
          _ = _TestClassA(cfg, arg3=3)
  
      # overwrite arg2 with correct config later:
      _ = _TestClassA(cfg, arg2=2, arg3=3)
      _ = _TestClassB(cfg, input_shape="shape", arg2=2, arg3=3)
      _ = _TestClassC(cfg, input_shape="shape", arg2=2, arg3=3)
      _ = _TestClassD(cfg, input_shape="shape", arg2=2, arg3=3)
  
      # call with kwargs cfg=cfg instead
      _ = _TestClassA(cfg=cfg, arg2=2, arg3=3)
      _ = _TestClassB(cfg=cfg, input_shape="shape", arg2=2, arg3=3)
      _ = _TestClassC(cfg=cfg, input_shape="shape", arg2=2, arg3=3)
      _ = _TestClassD(cfg=cfg, input_shape="shape", arg2=2, arg3=3)
  
imports: import os
  import tempfile
  import unittest
  import torch
  from omegaconf import OmegaConf
  from detectron2 import model_zoo
  from detectron2.config import configurable, downgrade_config, get_cfg, upgrade_config
  from detectron2.layers import ShapeSpec
  from detectron2.modeling import build_model
label_desc: Use image node_id 4 for calling the TestConfigurable obj's underlying member method code with example usage: obj.testInitWithCfgOverwrite() without return types