code: def _x3d(
      pretrained: bool = False,
      progress: bool = True,
      checkpoint_path: Optional[str] = None,
      **kwargs: Any,
  ) -> nn.Module:
      model = create_x3d(**kwargs)
      if pretrained and checkpoint_path is not None:
          # All models are loaded onto CPU by default
          checkpoint = load_state_dict_from_url(
              checkpoint_path, progress=progress, map_location="cpu"
          )
          state_dict = checkpoint["model_state"]
          model.load_state_dict(state_dict)
      return model
  
file_path: pytorchvideo/pytorchvideo/models/hub/x3d.py
imports: from typing import Any, Optional
  import torch.nn
  from pytorchvideo.models.x3d import create_x3d
  from torch.hub import load_state_dict_from_url
label_desc: Use image node_id 1 for calling a global function with example usage: _x3d(pretrained, progress, checkpoint_path) and returns: model