class_docstr: Module that adds a FPN from on top of a set of feature maps. This is based on
  `"Feature Pyramid Network for Object Detection" <https://arxiv.org/abs/1612.03144>`_.
  
  The feature maps are currently supposed to be in increasing depth
  order.
  
  The input to the model is expected to be an OrderedDict[Tensor], containing
  the feature maps on top of which the FPN will be added.
  
  Args:
      spatial_dims: 2D or 3D images
      in_channels_list: number of channels for each feature map that
          is passed to the module
      out_channels: number of channels of the FPN representation
      extra_blocks: if provided, extra operations will
          be performed. It is expected to take the fpn features, the original
          features and the names of the original features as input, and returns
          a new list of feature maps and their corresponding names
  
  Examples::
  
      >>> m = FeaturePyramidNetwork(2, [10, 20, 30], 5)
      >>> # get some dummy data
      >>> x = OrderedDict()
      >>> x['feat0'] = torch.rand(1, 10, 64, 64)
      >>> x['feat2'] = torch.rand(1, 20, 16, 16)
      >>> x['feat3'] = torch.rand(1, 30, 8, 8)
      >>> # compute the FPN on top of x
      >>> output = m(x)
      >>> print([(k, v.shape) for k, v in output.items()])
      >>> # returns
      >>>   [('feat0', torch.Size([1, 5, 64, 64])),
      >>>    ('feat2', torch.Size([1, 5, 16, 16])),
      >>>    ('feat3', torch.Size([1, 5, 8, 8]))]
docstr: This is equivalent to self.layer_blocks[idx](x),
  but torchscript doesn't support this yet
docstr_tok: ["This","is","equivalent","to","self.layer_blocks","[","idx","]","(","x",")",",","but","torchscript","does","n't","support","this","yet"]
code: def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor:
      """
      This is equivalent to self.layer_blocks[idx](x),
      but torchscript doesn't support this yet
      """
      num_blocks = len(self.layer_blocks)
      if idx < 0:
          idx += num_blocks
      out = x
      for i, module in enumerate(self.layer_blocks):
          if i == idx:
              out = module(x)
      return out
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from collections.abc import Callable
  import torch.nn.functional
  from torch import Tensor, nn
  from monai.networks.layers.factories import Conv, Pool
label_desc: Use image node_id 3 for calling the FeaturePyramidNetwork obj's underlying member method code with example usage: obj.get_result_from_layer_blocks(x, idx) and returns: out