code: def test_metadata_invalid_json(self, mock_sdk_client):
      runner = CliRunner()
  
      with set_env_var("RAY_ADDRESS", "env_addr"):
          result = runner.invoke(
              job_cli_group,
              [
                  "submit",
                  "--metadata-json",
                  '{"key": "value"',
                  "--",
                  "echo hello",
              ],
          )
          print(result.output)
          check_exit_code(result, 1)
          assert "not a valid JSON string" in result.output
  
imports: from contextlib import contextmanager
  import json
  import logging
  from pathlib import Path
  import tempfile
  import os
  from unittest import mock
  import yaml
  from typing import Optional
  from click.testing import CliRunner
  import pytest
  from ray.dashboard.modules.job.cli import job_cli_group
label_desc: Use image node_id 11 for calling the TestSubmit obj's underlying member method code with example usage: obj.test_metadata_invalid_json(mock_sdk_client) without return types