code: def test_redact_url_password():
      url = "http://user:password@host:port"
      assert (
          redact_url_password(url) == "http://user:<redacted>@host:port"
      )
      url = "http://user:password@host:port?query=1"
      assert (
          redact_url_password(url)
          == "http://user:<redacted>@host:port?query=1"
      )
      url = "http://user:password@host:port?query=1&password=2"
      assert (
          redact_url_password(url)
          == "http://user:<redacted>@host:port?query=1&password=2"
      )
      url = "https://user:password@127.0.0.1:8080"
      assert (
          redact_url_password(url)
          == "https://user:<redacted>@127.0.0.1:8080"
      )
      url = "https://user:password@host:port?query=1"
      assert (
          redact_url_password(url)
          == "https://user:<redacted>@host:port?query=1"
      )
      url = "https://user:password@host:port?query=1&password=2"
      assert (
          redact_url_password(url)
          == "https://user:<redacted>@host:port?query=1&password=2"
      )
  
file_path: ray/python/ray/dashboard/modules/job/tests/test_utils.py
imports: from tempfile import NamedTemporaryFile
  import sys
  import pytest
  from ray.dashboard.modules.job.common import JobSubmitRequest
  from ray.dashboard.modules.job.utils import file_tail_iterator, strip_keys_with_value_none, parse_and_validate_request, redact_url_password
label_desc: Use image node_id 3 for calling a global function with example usage: test_redact_url_password() without return types