code: def build_hrfpn_backbone(cfg, input_shape: ShapeSpec) -> HRFPN:
      in_channels = cfg.MODEL.HRNET.STAGE4.NUM_CHANNELS
      in_features = [
          "p%d" % (i + 1)
          for i in range(cfg.MODEL.HRNET.STAGE4.NUM_BRANCHES)
      ]
      n_out_features = len(cfg.MODEL.ROI_HEADS.IN_FEATURES)
      out_channels = cfg.MODEL.HRNET.HRFPN.OUT_CHANNELS
      hrnet = build_pose_hrnet_backbone(cfg, input_shape)
      hrfpn = HRFPN(
          hrnet,
          in_features,
          n_out_features,
          in_channels,
          out_channels,
          pooling="AVG",
          share_conv=False,
      )
  
      return hrfpn
  
file_path: detectron2/projects/DensePose/densepose/modeling/hrfpn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from detectron2.layers import ShapeSpec
  from detectron2.modeling.backbone import BACKBONE_REGISTRY
  from detectron2.modeling.backbone.backbone import Backbone
  from .hrnet import build_pose_hrnet_backbone
label_desc: Use image node_id 1 for calling a global function with example usage: build_hrfpn_backbone(cfg, input_shape) and returns: hrfpn