code: def test_inline_arg_memory_corruption(ray_start_regular_shared):
      @ray.remote
      def f():
          return bytes(1000)
  
      @ray.remote
      class Actor:
          def __init__(self):
              self.z = []
  
          def add(self, x):
              self.z.append(x)
              for prev in self.z:
                  assert sum(prev) == 0, (
                      "memory corruption detected",
                      prev,
                  )
  
      a = Actor.remote()
      for i in range(100):
          ray.get(a.add.remote(f.remote()))
  
imports: import array
  import logging
  import os
  import random
  import subprocess
  import sys
  import tempfile
  import threading
  import time
  from unittest.mock import MagicMock, patch
  import pytest
  from ray._private.ray_constants import KV_NAMESPACE_FUNCTION_TABLE
  from ray._private.test_utils import client_test_enabled
  from ray.cluster_utils import Cluster, cluster_not_supported
  from ray.exceptions import GetTimeoutError, RayTaskError
  from ray.tests.client_test_utils import create_remote_signal_actor
label_desc: Use image node_id 12 for calling a global function with example usage: test_inline_arg_memory_corruption(ray_start_regular_shared) and returns: bytes