code: def module_contains_param(
      module: nn.Module, parametrization: Type[nn.Module]
  ) -> bool:
      if is_parametrized(module):
          # see if any of the module tensors have a parametriztion attached that matches the one passed in
          return any(
              any(
                  isinstance(param, parametrization)
                  for param in param_list
              )
              for key, param_list in module.parametrizations.items()  # type: ignore[union-attr,operator]
          )
      return False
  
file_path: pytorch/torch/ao/pruning/sparsifier/utils.py
imports: from typing import Any, Dict, Optional, Type
  from torch.nn.utils.parametrize import type_before_parametrizations, is_parametrized
  from itertools import chain
  from torch import nn
label_desc: Use image node_id 1 for calling a global function with example usage: module_contains_param(module, parametrization) and returns: False, any