code: def check_nodes_are_serializable(label, nodes):
      """Raises an exception if some `PyNode` objects are not serializable."""
      enable_lru_cache_pickling_once()
      # We only try to serialize `PyNode` objects (as they are the only nodes for
      # which the default implementation of `to_executables` will do serialization
      # of `node.function`).
      functions = [
          node.function for node in nodes if hasattr(node, "function")
      ]
      _cloudpickle_dump_with_user_friendly_error(
          functions, f"{label} ({type(nodes[0])}"
      )
  
file_path: launchpad/launchpad/launch/serialization.py
imports: import copyreg
  import functools
  from absl import flags
  import cloudpickle
  from launchpad import flags
label_desc: Use image node_id 3 for calling a global function with example usage: check_nodes_are_serializable(label, nodes) without return types