code: def from_config(cls, cfg, input_shape):
      roi_pooler = cfg["roi_extractor"]
      assert isinstance(roi_pooler, dict)
      kwargs = RoIAlign.from_config(cfg, input_shape)
      roi_pooler.update(kwargs)
      kwargs = {"input_shape": input_shape}
      head = create(cfg["head"], **kwargs)
      return {
          "roi_extractor": roi_pooler,
          "head": head,
          "in_channel": head.out_shape[0].channels,
      }
  
imports: import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.nn.initializer import Normal, XavierUniform, KaimingNormal
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register, create
  from .roi_extractor import RoIAlign
  from ..shape_spec import ShapeSpec
  from ..bbox_utils import bbox2delta
  from ..cls_utils import _get_class_default_kwargs
  from ppdet.modeling.layers import ConvNormLayer
label_desc: Use image node_id 3 for calling the BBoxHead obj's underlying member method code with example usage: obj.from_config(cls, cfg, input_shape) and returns: dict