code: def _should_skip_if_mismatch(
      shape1: Tuple[str, torch.Size],
      shape2: Tuple[str, torch.Size],
      config: Dict[str, Any],
  ) -> None:
      if shape1[1] != shape2[1]:
          message = f"""
              Modules {shape1[0]} and {shape2[0]} don't have the same shape:
              own_attr has shape {shape1[1]} while
              attr has shape {shape2[1]}. This can fail down the line.
              """
          if config.checkpoint.get("bypass_shape_mismatch", False):
              message += "bypass_shape_mismatch in config.checkpoint "
              message += "is set to be True, -- so skipping copy"
              logger.warning(message)
  
              return True
          else:
              logger.warning(message)
  
      # In case of either mismatch or match both, MMF will try
      # to copy the attribute.
      return False
  
file_path: mmf/mmf/utils/checkpoint_updater.py
imports: import logging
  from typing import Any, Dict, Tuple
  import torch
  from mmf.common.registry import registry
label_desc: Use image node_id 5 for calling a global function with example usage: _should_skip_if_mismatch(shape1, shape2, config) and returns: False, True