code: def _warn_if_nested_mutable(obj: Any, cls_name: str) -> None:
      # Warn for cases like MutableConv2d(kernel_size=(nni.choice([3, 5]), nni.choice([3, 5])))
      # This is not designed to be reliable, but only to be user-friendly.
      def _iter(o):
          if isinstance(o, Mutable):
              _logger.warning(
                  f"Found a nested mutable {o} in parameter {obj} of class {cls_name}. "
                  "This is not recommended, because the mutable will not be tracked. "
                  "Please use MutableList, MutableDict instead, or write every options in a `nni.choice`."
              )
          else:
              if isinstance(o, (list, tuple, set)):
                  for item in o:
                      _iter(item)
              elif isinstance(o, dict):
                  for value in o.values():
                      _iter(value)
  
      _iter(obj)
  
imports: import copy
  import itertools
  import inspect
  import logging
  from typing import Any, Callable, Type, Iterable, Dict, Tuple, List, Optional, TypeVar
  import torch
  from torch import nn
  from nni.mutable import Mutable, LabeledMutable, Sample, SampleValidationError, ensure_frozen, frozen_context, label_scope, frozen
  from nni.nas.space import BaseModelSpace, current_model, model_context
  from nni.common.serializer import SerializableObject, _formulate_arguments, _copy_class_wrapper_attributes
label_desc: Use image node_id 4 for calling a global function with example usage: _warn_if_nested_mutable(obj, cls_name) without return types