code: def _rename_HRNet_weights(weights):
      # We detect and  rename HRNet weights for DensePose. 1956 and 1716 are values that are
      # common to all HRNet pretrained weights, and should be enough to accurately identify them
      if (
          len(weights["model"].keys()) == 1956
          and len(
              [
                  k
                  for k in weights["model"].keys()
                  if k.startswith("stage")
              ]
          )
          == 1716
      ):
          hrnet_weights = OrderedDict()
          for k in weights["model"].keys():
              hrnet_weights["backbone.bottom_up." + str(k)] = weights[
                  "model"
              ][k]
          return {"model": hrnet_weights}
      else:
          return weights
  
imports: from collections import OrderedDict
  from detectron2.checkpoint import DetectionCheckpointer
label_desc: Use image node_id 1 for calling a global function with example usage: _rename_HRNet_weights(weights) and returns: dict, weights