code: def _video_resnet(
      block: Type[Union[BasicBlock, Bottleneck]],
      conv_makers: Sequence[
          Type[Union[Conv3DSimple, Conv3DNoTemporal, Conv2Plus1D]]
      ],
      layers: List[int],
      stem: Callable[..., nn.Module],
      weights: Optional[WeightsEnum],
      progress: bool,
      **kwargs: Any,
  ) -> VideoResNet:
      if weights is not None:
          _ovewrite_named_param(
              kwargs, "num_classes", len(weights.meta["categories"])
          )
  
      model = VideoResNet(block, conv_makers, layers, stem, **kwargs)
  
      if weights is not None:
          model.load_state_dict(
              weights.get_state_dict(progress=progress, check_hash=True)
          )
  
      return model
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Sequence, Tuple, Type, Union
  import torch.nn
  from torch import Tensor
  from ...transforms._presets import VideoClassification
  from ...utils import _log_api_usage_once
  from .._api import register_model, Weights, WeightsEnum
  from .._meta import _KINETICS400_CATEGORIES
  from .._utils import _ovewrite_named_param, handle_legacy_interface
  from .._utils import _ModelURLs
label_desc: Use image node_id 1 for calling a global function with example usage: _video_resnet(block, conv_makers, layers, stem, weights, progress) and returns: model