code: def create_model(
      model_name: str = None,
      pretrained: bool = True,
      device: str = None,
  ):
      if device is None:
          device = "cuda" if torch.cuda.is_available() else "cpu"
      if model_name == "omnivore_swinT":
          model = omnivore_swint(pretrained=pretrained)
      elif model_name == "omnivore_swinS":
          model = omnivore_swins(pretrained=pretrained)
      elif model_name == "omnivore_swinB":
          model = omnivore_swinb(pretrained=pretrained)
      elif model_name == "omnivore_swinB_in21k":
          model = omnivore_swinb_imagenet21k(pretrained=pretrained)
      elif model_name == "omnivore_swinL_in21k":
          model = omnivore_swinl_imagenet21k(pretrained=pretrained)
      elif model_name == "omnivore_swinB_epic":
          model = omnivore_swinb_epic(pretrained=pretrained)
      else:
          raise AttributeError(f"Invalid model_name {model_name}.")
      model.to(device)
      return model
  
imports: from towhee.models.video_swin_transformer.video_swin_transformer import VideoSwinTransformer
  from typing import Any, Optional, Union
  import torch
  from torch import nn
  from torch.hub import load_state_dict_from_url
label_desc: Use image node_id 14 for calling a global function with example usage: create_model(model_name, pretrained, device) and returns: model