code: def _ignore_missing_weights_hook(
      module: torch.nn.Module, incompatible_keys: _IncompatibleKeys
  ) -> None:
      # since we manually loaded the weight in the `_quantize_on_load_hook` hook, we need to avoid this missing key false
      # positive
      for key in reversed(incompatible_keys.missing_keys):
          if key.endswith("weight"):
              incompatible_keys.missing_keys.remove(key)
  
imports: import functools
  import logging
  import math
  import os
  import warnings
  from contextlib import ExitStack
  from functools import partial
  from types import ModuleType
  from typing import Any, Callable, ContextManager, Literal, Optional, OrderedDict, Set, Tuple, Type, cast
  import torch
  from lightning_utilities import apply_to_collection
  from lightning_utilities.core.imports import RequirementCache
  from torch import Tensor
  from torch.nn import init
  from torch.nn.modules.module import _IncompatibleKeys
  from typing_extensions import Self, override
  from lightning.fabric.plugins.precision.precision import Precision
  from lightning.fabric.plugins.precision.utils import _ClassReplacementContextManager, _convert_fp_tensor, _DtypeContextManager
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 2 for calling a global function with example usage: _ignore_missing_weights_hook(module, incompatible_keys) without return types