code: def test_format_url_custom_api_url():
      api = SentinelAPI(
          "user", "pw", api_url="https://scihub.copernicus.eu/dhus/"
      )
      url = api._format_url()
      assert url.startswith("https://scihub.copernicus.eu/dhus/search")
  
      api = SentinelAPI(
          "user", "pw", api_url="https://scihub.copernicus.eu/dhus"
      )
      url = api._format_url()
      assert url.startswith("https://scihub.copernicus.eu/dhus/search")
  
imports: from contextlib import contextmanager
  from datetime import datetime, date, timedelta
  import pytest
  import requests_mock
  from requests.exceptions import StreamConsumedError, ContentDecodingError, InvalidProxyURL, InvalidHeader, TooManyRedirects, ReadTimeout, SSLError
  from sentinelsat import format_query_date, SentinelAPI
  from sentinelsat.exceptions import QuerySyntaxError, QueryLengthError, UnauthorizedError
  from sentinelsat.sentinel import _format_order_by
label_desc: Use image node_id 13 for calling a global function with example usage: test_format_url_custom_api_url() without return types