code: def test_simple_serialization(ray_start_regular):
      primitive_objects = [
          # Various primitive types.
          0,
          0.0,
          0.9,
          1 << 62,
          1 << 999,
          b"",
          b"a",
          "a",
          string.printable,
          "\u262F",
          "hello world",
          "\xff\xfe\x9c\x001\x000\x00",
          None,
          True,
          False,
          [],
          (),
          {},
          type,
          int,
          set(),
          # Collections types.
          collections.Counter(
              [np.random.randint(0, 10) for _ in range(100)]
          ),
          collections.OrderedDict([("hello", 1), ("world", 2)]),
          collections.defaultdict(
              lambda: 0, [("hello", 1), ("world", 2)]
          ),
          collections.defaultdict(
              lambda: [], [("hello", 1), ("world", 2)]
          ),
          collections.deque([1, 2, 3, "a", "b", "c", 3.5]),
          # Numpy dtypes.
          np.int8(3),
          np.int32(4),
          np.int64(5),
          np.uint8(3),
          np.uint32(4),
          np.uint64(5),
          np.float32(1.9),
          np.float64(1.9),
      ]
  
      composite_objects = (
          [[obj] for obj in primitive_objects]
          + [(obj,) for obj in primitive_objects]
          + [{(): obj} for obj in primitive_objects]
      )
  
      @ray.remote
      def f(x):
          return x
  
      # Check that we can pass arguments by value to remote functions and
      # that they are uncorrupted.
      for obj in primitive_objects + composite_objects:
          new_obj_1 = ray.get(f.remote(obj))
          new_obj_2 = ray.get(ray.put(obj))
          assert obj == new_obj_1
          assert obj == new_obj_2
          # TODO(rkn): The numpy dtypes currently come back as regular integers
          # or floats.
          if type(obj).__module__ != "numpy":
              assert type(obj) == type(new_obj_1)
              assert type(obj) == type(new_obj_2)
  
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 2 for calling a global function with example usage: test_simple_serialization(ray_start_regular) and returns: x