code: def _merge_cfg_str(self, cfg, merge_str):
      f = tempfile.NamedTemporaryFile(
          mode="w", suffix=".yaml", delete=False
      )
      try:
          f.write(merge_str)
          f.close()
          cfg.merge_from_file(f.name)
      finally:
          os.remove(f.name)
      return cfg
  
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 2 for calling the TestConfigVersioning obj's underlying member method code with example usage: obj._merge_cfg_str(cfg, merge_str) and returns: cfg