code: def test_omit_http_default_port(self):
      replacer = URLReplacer(
          ports={8000: 80},
          app_specs=[],
          hostname="1.2.3.4",
          secure=False,
      )
      assert (
          replacer(b"http://0.0.0.0:8000/qwerty")
          == b"http://1.2.3.4/qwerty"
      )
  
file_path: dstack/src/tests/_internal/core/services/test_logs.py
imports: from dstack._internal.core.models.runs import AppSpec
  from dstack._internal.core.services.logs import URLReplacer
label_desc: Use image node_id 2 for calling the TestServiceURLReplacer obj's underlying member method code with example usage: obj.test_omit_http_default_port() without return types