code: def test_clean_namespace():
      # See the full list of picklable types at
      # https://docs.python.org/3/library/pickle.html#pickle-picklable
      class UnpicklableClass:
          # Only classes defined at the top level of a module are picklable.
          pass
  
      test_case = {
          "1": None,
          "2": True,
          "3": 123,
          "4": unpicklable_function,
          "5": UnpicklableClass,
      }
  
      clean_namespace(test_case)
  
      assert test_case == {"1": None, "2": True, "3": 123}
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_parsing.py
imports: import inspect
  import threading
  import pytest
  from lightning.pytorch import LightningDataModule, LightningModule, Trainer
  from lightning.pytorch.utilities.parsing import _get_init_args, clean_namespace, collect_init_args, is_picklable, lightning_getattr, lightning_hasattr, lightning_setattr, parse_class_init_keys
  from torch.jit import ScriptModule
label_desc: Use image node_id 6 for calling a global function with example usage: test_clean_namespace() without return types