code: def _ovewrite_value_param(
      param: str, actual: Optional[V], expected: V
  ) -> V:
      if actual is not None:
          if actual != expected:
              raise ValueError(
                  f"The parameter '{param}' expected value {expected} but got {actual} instead."
              )
      return expected
  
file_path: vision/torchvision/models/_utils.py
imports: import functools
  import inspect
  import warnings
  from collections import OrderedDict
  from typing import Any, Callable, Dict, Optional, Tuple, TypeVar, Union
  from torch import nn
  from .._utils import sequence_to_str
  from ._api import WeightsEnum
label_desc: Use image node_id 5 for calling a global function with example usage: _ovewrite_value_param(param, actual, expected) and returns: expected