code: def generate_raw_anchors(
      feature_maps,
      anchor_min_scale,
      anchor_max_scale,
      anchor_ratios,
      anchors_per_point,
  ):
      """
      Returns a dictionary containing the anchors per feature map.
  
      Returns:
      anchors: A dictionary with feature maps as keys and an array of anchors
          as values ('[[x_min, y_min, x_max, y_max], ...]') with shape
          (anchors_per_point[i] * endpoints_outputs[i][0]
           * endpoints_outputs[i][1], 4)
      """
      # TODO: Anchor generation needs heavy refactor
  
      # We interpolate the scales of the anchors from a min and a max scale
      scales = np.linspace(
          anchor_min_scale, anchor_max_scale, len(feature_maps)
      )
  
      anchors = {}
      for i, (feat_map_name, feat_map) in enumerate(
          feature_maps.items()
      ):
          feat_map_shape = feat_map.shape.as_list()[1:3]
          anchor_reference = generate_anchors_reference(
              anchor_ratios,
              scales[i : i + 2],
              anchors_per_point[i],
              feat_map_shape,
          )
          anchors[feat_map_name] = generate_anchors_per_feat_map(
              feat_map_shape, anchor_reference
          )
  
      return anchors
  
imports: import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: generate_raw_anchors(feature_maps, anchor_min_scale, anchor_max_scale, anchor_ratios, anchors_per_point) and returns: anchors