code: def from_config(cls, cfg, input_shape):
      return {
          "in_channels": [i.channels for i in input_shape],
          "spatial_scales": [1.0 / i.stride for i in input_shape],
      }
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  import math
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from paddle.nn.initializer import Constant, TruncatedNormal
  from ppdet.modeling.shape_spec import ShapeSpec
  from ppdet.core.workspace import register, serializable
  from .transformer_utils import zeros_, DropPath, Identity, window_partition, window_unpartition
  from ..initializer import linear_init_
label_desc: Use image node_id 2 for calling the SimpleFeaturePyramid obj's underlying member method code with example usage: obj.from_config(cls, cfg, input_shape) and returns: dict