class_docstr: Feature Pyramid Network as used in 'Deep Attentive Features for Prostate Segmentation in 3D Transrectal Ultrasound'
  <https://arxiv.org/pdf/1907.01743.pdf>.
  Omits 3x3x3 convolution of layer_blocks and interpolates resulting feature maps to be the same size as
  feature map with highest resolution.
  
  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
class_docstr_tok: ["Feature","Pyramid","Network","as","used","in","'Deep","Attentive","Features","for","Prostate","Segmentation","in","3D","Transrectal","Ultrasound'","<","https",":","\/\/arxiv.org\/pdf\/1907.01743.pdf",">",".","Omits","3x3x3","convolution","of","layer_blocks","and","interpolates","resulting","feature","maps","to","be","the","same","size","as","feature","map","with","highest","resolution",".","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"]
code: def forward(self, x: dict[str, Tensor]) -> dict[str, Tensor]:
      # unpack OrderedDict into two lists for easier handling
      names = list(x.keys())
      x_values: list[Tensor] = list(x.values())
  
      last_inner = self.get_result_from_inner_blocks(x_values[-1], -1)
      results = []
      results.append(last_inner)
  
      for idx in range(len(x_values) - 2, -1, -1):
          inner_lateral = self.get_result_from_inner_blocks(
              x_values[idx], idx
          )
          feat_shape = inner_lateral.shape[2:]
          inner_top_down = F.interpolate(
              last_inner, size=feat_shape, mode="trilinear"
          )
          last_inner = inner_lateral + inner_top_down
          results.insert(0, last_inner)
  
      if self.extra_blocks is not None:
          results, names = self.extra_blocks(results, x_values, names)
  
      # bring all layers to same size
      results = [results[0]] + [
          F.interpolate(l, size=x["feat1"].size()[2:], mode="trilinear")
          for l in results[1:]
      ]
      # make it back an OrderedDict
      out = OrderedDict(list(zip(names, results)))
  
      return out
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from collections.abc import Callable, Sequence
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from monai.networks.blocks import ADN
  from monai.networks.blocks.aspp import SimpleASPP
  from monai.networks.blocks.backbone_fpn_utils import BackboneWithFPN
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.blocks.feature_pyramid_network import ExtraFPNBlock, FeaturePyramidNetwork
  from monai.networks.layers.factories import Conv, Norm
  from monai.networks.nets.resnet import ResNet, ResNetBottleneck
label_desc: Use image node_id 2 for calling the Daf3dFPN obj's underlying member method code with example usage: obj.forward(x) and returns: out