code: def generate_config(_network, _dataset):
      for k, v in network[_network].items():
          if k in config:
              config[k] = v
          elif k in default:
              default[k] = v
          if k in config.TRAIN:
              config.TRAIN[k] = v
      for k, v in dataset[_dataset].items():
          if k in config:
              config[k] = v
          elif k in default:
              default[k] = v
          if k in config.TRAIN:
              config.TRAIN[k] = v
      config.network = _network
      config.dataset = _dataset
      config.RPN_FEAT_STRIDE = []
      num_anchors = []
      for k in config.RPN_ANCHOR_CFG:
          config.RPN_FEAT_STRIDE.append(int(k))
          _num_anchors = len(config.RPN_ANCHOR_CFG[k]["SCALES"]) * len(
              config.RPN_ANCHOR_CFG[k]["RATIOS"]
          )
          if config.DENSE_ANCHOR:
              _num_anchors *= 2
          config.RPN_ANCHOR_CFG[k]["NUM_ANCHORS"] = _num_anchors
          num_anchors.append(_num_anchors)
      config.RPN_FEAT_STRIDE = sorted(
          config.RPN_FEAT_STRIDE, reverse=True
      )
      for j in range(1, len(num_anchors)):
          assert num_anchors[0] == num_anchors[j]
      config.NUM_ANCHORS = num_anchors[0]
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_config(_network, _dataset) without return types