code: def build_backbone(
      hidden_dim=512,
      position_embedding="learned",
      backbone="resnet50",
  ):
      position_embedding = build_position_encoding(
          hidden_dim=hidden_dim,
          position_embedding=position_embedding,
      )
      backbone = Backbone(
          backbone,
          train_backbone=False,
          return_interm_layers=False,
          dilation=False,
      )
      model = Joiner(backbone, position_embedding)
      model.num_channels = backbone.num_channels
      return model
  
file_path: towhee/towhee/models/coformer/backbone.py
imports: import torch
  import torch.nn.functional
  import torchvision
  from torch import nn
  from torchvision.models._utils import IntermediateLayerGetter
  from typing import Dict, List
  from towhee.models.coformer.utils import NestedTensor, is_main_process
  from towhee.models.layers.position_encoding import build_position_encoding
label_desc: Use image node_id 1 for calling a global function with example usage: build_backbone(hidden_dim, position_embedding, backbone) and returns: model