code: def configure_bbox_reg_weights(model, saved_cfg):
      """Compatibility for old models trained with bounding box regression
      mean/std normalization (instead of fixed weights).
      """
      if (
          "MODEL" not in saved_cfg
          or "BBOX_REG_WEIGHTS" not in saved_cfg.MODEL
      ):
          logger.warning(
              "Model from weights file was trained before config key "
              "MODEL.BBOX_REG_WEIGHTS was added. Forcing "
              "MODEL.BBOX_REG_WEIGHTS = (1., 1., 1., 1.) to ensure "
              "correct **inference** behavior."
          )
          # Generally we don't allow modifying the config, but this is a one-off
          # hack to support some very old models
          is_immutable = cfg.is_immutable()
          cfg.immutable(False)
          cfg.MODEL.BBOX_REG_WEIGHTS = (1.0, 1.0, 1.0, 1.0)
          cfg.immutable(is_immutable)
          logger.info("New config:")
          logger.info(pprint.pformat(cfg))
          assert not model.train, (
              "This model was trained with an older version of the code that "
              "used bounding box regression mean/std normalization. It can no "
              "longer be used for training. To upgrade it to a trainable model "
              "please use fb/compat/convert_bbox_reg_normalized_model.py."
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import OrderedDict
  import cPickle
  import logging
  import numpy
  import os
  import pprint
  import yaml
  from caffe2.python import core
  from caffe2.python import workspace
  from detectron.core.config import cfg
  from detectron.core.config import load_cfg
  from detectron.utils.io import save_object
  import detectron.utils.c2
label_desc: Use image node_id 8 for calling a global function with example usage: configure_bbox_reg_weights(model, saved_cfg) without return types