code: def test_convert_args_to_dict():
      assert convert_args_to_dict(tuple()) == {}
  
      with pytest.raises(
          click.ClickException,
          match="Invalid application argument 'bad_arg'",
      ):
          convert_args_to_dict(("bad_arg",))
  
      assert convert_args_to_dict(("key1=val1", "key2=val2")) == {
          "key1": "val1",
          "key2": "val2",
      }
  
imports: import os
  import subprocess
  import sys
  import time
  from copy import deepcopy
  from tempfile import NamedTemporaryFile
  from typing import List
  import click
  import pytest
  import requests
  import yaml
  import ray
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray.serve._private.common import DeploymentID
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME, SERVE_NAMESPACE
  from ray.serve.scripts import convert_args_to_dict, remove_ansi_escape_sequences
  from ray.tests.conftest import tmp_working_dir
  from ray.util.state import list_actors
label_desc: Use image node_id 2 for calling a global function with example usage: test_convert_args_to_dict() without return types