code: def test_inspect_serialization(enable_pickle_debug):
      import threading
  
      from ray.cloudpickle import dumps_debug
  
      lock = threading.Lock()
  
      with pytest.raises(TypeError):
          dumps_debug(lock)
  
      def test_func():
          print(lock)
  
      with pytest.raises(TypeError):
          dumps_debug(test_func)
  
      class test_class:
          def test(self):
              self.lock = lock
  
      from ray.util.check_serialize import inspect_serializability
  
      results = inspect_serializability(lock)
      assert list(results[1])[0].obj == lock, results
  
      results = inspect_serializability(test_func)
      assert list(results[1])[0].obj == lock, results
  
      results = inspect_serializability(test_class)
      assert list(results[1])[0].obj == lock, results
  
imports: import collections
  import io
  import logging
  import re
  import string
  import sys
  import weakref
  from dataclasses import make_dataclass
  import numpy
  import pytest
  from numpy import log
  import ray
  import ray.cluster_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_inspect_serialization(enable_pickle_debug) without return types