code: def create_moco_resnet_50(
      # Backbone
      backbone_creator: Callable = create_resnet,  # pyre-ignore[24]
      backbone_embed_dim: int = 128,
      head_pool: Callable = nn.AdaptiveAvgPool3d,  # pyre-ignore[24]
      head_output_size: Tuple[int, int, int] = (1, 1, 1),
      head_activation: Callable = None,  # pyre-ignore[9,24]
      dropout_rate: float = 0.0,
      # Projector
      projector_dim_in: int = 2048,
      projector_inner_dim: int = 2048,
      projector_depth: int = 3,
      projector_norm: Optional[Callable] = None,  # pyre-ignore[24]
      mmt: float = 0.994,
  ) -> nn.Module:
      def _make_bacbone_and_projector():  # pyre-ignore[3]
          backbone = backbone_creator(
              dropout_rate=dropout_rate,
              head_activation=head_activation,
              head_output_with_global_average=True,
              head_pool=head_pool,
              head_output_size=head_output_size,
              stem_conv_kernel_size=(1, 7, 7),
              head_pool_kernel_size=(8, 7, 7),
          )
  
          backbone.blocks[-1].proj = None  # Overwite head projection
          projector = create_mlp_util(
              projector_dim_in,
              backbone_embed_dim,
              projector_inner_dim,
              projector_depth,
              norm=projector_norm,  # pyre-ignore[6]
          )
          return backbone, projector
  
      backbone, projector = _make_bacbone_and_projector()
      backbone_mmt, projector_mmt = _make_bacbone_and_projector()
  
      moco_model = MOCO(
          mmt=mmt,
          backbone=backbone,
          projector=projector,
          backbone_mmt=backbone_mmt,
          projector_mmt=projector_mmt,
      )
      return moco_model
  
imports: import math
  from dataclasses import dataclass
  from typing import Any, Callable, List, Optional, Tuple, Union
  import pytorchvideo_trainer.module.distributed_utils
  import torch
  import torch.nn
  import torch.nn.functional
  from hydra.core.config_store import ConfigStore
  from omegaconf import MISSING
  from pytorchvideo.models.resnet import create_resnet
  from pytorchvideo.models.weight_init import init_net_weights
  from pytorchvideo_trainer.module.ssl_helper import create_mlp_util, SSLBaseModule
  from pytorchvideo_trainer.module.video_classification import Batch, BatchKey, EnsembleMethod
  from torchrecipes.core.conf import ModuleConf
  from torchrecipes.utils.config_utils import get_class_name_str
label_desc: Use image node_id 1 for calling a global function with example usage: create_moco_resnet_50(backbone_creator, backbone_embed_dim, head_pool, head_output_size, head_activation, dropout_rate, projector_dim_in, projector_inner_dim, projector_depth, projector_norm, mmt) and returns: moco_model, backbone,  projector