code: def _get_ignored_params(
      root_module: torch.nn.Module,
      ignored_modules: Set[torch.nn.Module],
      ignored_parameters: Optional[Iterable[torch.nn.Parameter]] = None,
  ) -> Set[torch.nn.Parameter]:
      """
      Return the parameters of the modules in ``ignored_modules`` and the parameters in ``ignored_parameters``.
  
      :class:`FlatParameter` s are excluded from the result.
      """
      all_ignored_params: Set[torch.nn.Parameter] = set()
  
      params_in_ignored_modules = {
          p
          for m in ignored_modules
          for p in m.parameters()
          if not _is_fsdp_flattened(p)
      }
  
      all_ignored_params.update(params_in_ignored_modules)
  
      if ignored_parameters is not None:
          params_in_ignored_parameters = {
              p for p in ignored_parameters if not _is_fsdp_flattened(p)
          }
          all_ignored_params.update(params_in_ignored_parameters)
  
      # Always include nested FSDP modules' ignored parameters
      for submodule in root_module.modules():
          optional_fsdp_state = _get_module_fsdp_state(submodule)
          if optional_fsdp_state is not None:
              assert hasattr(optional_fsdp_state, "_ignored_params")
              all_ignored_params.update(
                  optional_fsdp_state._ignored_params
              )
  
      return all_ignored_params
  
imports: import collections
  import itertools
  import os
  import warnings
  from typing import Any, Callable, Deque, Dict, Generator, Iterable, Iterator, List, no_type_check, Optional, Set, Tuple, Union
  import torch
  import torch.distributed
  import torch.distributed.fsdp._exec_order_utils
  import torch.distributed.fsdp._traversal_utils
  import torch.distributed.fsdp.fully_sharded_data_parallel
  import torch.nn
  from torch.distributed.algorithms._comm_hooks import default_hooks
  from torch.distributed.device_mesh import _mesh_resources, DeviceMesh
  from torch.distributed.distributed_c10d import _get_default_group
  from torch.distributed.fsdp._common_utils import _FSDPDeviceHandle, _FSDPState, _get_module_fsdp_state, _is_fsdp_flattened, _named_parameters_with_duplicates, clean_tensor_name, TrainingState
  from torch.distributed.fsdp._flat_param import _FSDP_USE_FULL_PREC_IN_EVAL, FlatParameter, FlatParamHandle, HandleShardingStrategy
  from torch.distributed.fsdp._limiter_utils import _FreeEventQueue
  from torch.distributed.fsdp.api import BackwardPrefetch, CPUOffload, FullOptimStateDictConfig, FullStateDictConfig, MixedPrecision, ShardingStrategy, StateDictConfig, StateDictType
  from torch.distributed.fsdp.wrap import _Policy
  from torch.distributed.tensor.parallel.fsdp import DTensorExtensions
  from torch.distributed.utils import _sync_params_and_buffers
  from torch.utils._python_dispatch import is_traceable_wrapper_subclass
  from torch.utils.hooks import RemovableHandle
label_desc: Use image node_id 20 for calling a global function with example usage: _get_ignored_params(root_module, ignored_modules, ignored_parameters) and returns: all_ignored_params