code: def test_user_metadata_not_json_serializable(workflow_start_regular):
      @ray.remote
      def simple():
          return 0
  
      class X:
          pass
  
      with pytest.raises(ValueError):
          workflow.run_async(
              simple.options(
                  **workflow.options(metadata={"x": X()})
              ).bind()
          )
  
      with pytest.raises(ValueError):
          workflow.run(simple.bind(), metadata={"x": X()})
  
file_path: ray/python/ray/workflow/tests/test_metadata.py
imports: import time
  from ray.tests.conftest import *
  import pytest
  import ray
  from ray import workflow
label_desc: Use image node_id 4 for calling a global function with example usage: test_user_metadata_not_json_serializable(workflow_start_regular) and returns: int