code: def get_torchvision_model(
      model_name: str, **kwargs: Any
  ) -> nn.Module:
      from lightning.pytorch.utilities.imports import (
          _TORCHVISION_AVAILABLE,
      )
  
      if not _TORCHVISION_AVAILABLE:
          raise ModuleNotFoundError(str(_TORCHVISION_AVAILABLE))
  
      from torchvision import models
  
      torchvision_greater_equal_0_14 = RequirementCache(
          "torchvision>=0.14.0"
      )
      # TODO: deprecate this function when 0.14 is the minimum supported torchvision
      if torchvision_greater_equal_0_14:
          return models.get_model(model_name, **kwargs)
      return getattr(models, model_name)(**kwargs)
  
file_path: pytorch-lightning/src/lightning/pytorch/utilities/model_helpers.py
imports: import inspect
  import logging
  import os
  from types import MethodType
  from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, Optional, Type, TypeVar
  from lightning_utilities.core.imports import RequirementCache
  from torch import nn
  from typing_extensions import Concatenate, ParamSpec
  import lightning.pytorch
label_desc: Use image node_id 2 for calling a global function with example usage: get_torchvision_model(model_name) and returns: getattr, models