code: def test_is_picklable():
      # 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
  
      true_cases = [None, True, 123, "str", (123, "str"), max]
      false_cases = [
          unpicklable_function,
          UnpicklableClass,
          ScriptModule(),
          threading.Lock(),
      ]
  
      for case in true_cases:
          assert is_picklable(case) is True
  
      for case in false_cases:
          assert is_picklable(case) is False
  
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 5 for calling a global function with example usage: test_is_picklable() without return types