code: def _broadcast_params(params, num_features, name):
      """
      If one size (or aspect ratio) is specified and there are multiple feature
      maps, we "broadcast" anchors of that single size (or aspect ratio)
      over all feature maps.
  
      If params is list[float], or list[list[float]] with len(params) == 1, repeat
      it num_features time.
  
      Returns:
          list[list[float]]: param for each feature
      """
      assert isinstance(
          params, collections.abc.Sequence
      ), f"{name} in anchor generator has to be a list! Got {params}."
      assert len(params), f"{name} in anchor generator cannot be empty!"
      if not isinstance(
          params[0], collections.abc.Sequence
      ):  # params is list[float]
          return [params] * num_features
      if len(params) == 1:
          return list(params) * num_features
      assert len(params) == num_features, (
          f"Got {name} of length {len(params)} in anchor generator, "
          f"but the number of input features is {num_features}!"
      )
      return params
  
imports: import collections
  import math
  from typing import List
  import torch
  from torch import nn
  from detectron2.config import configurable
  from detectron2.layers import ShapeSpec, move_device_like
  from detectron2.structures import Boxes, RotatedBoxes
  from detectron2.utils.registry import Registry
label_desc: Use image node_id 2 for calling a global function with example usage: _broadcast_params(params, num_features, name) and returns: params, unknown, unknown