code: def test_api_query_format_with_duplicates():
      with pytest.raises(ValueError) as excinfo:
          SentinelAPI.format_query(
              date=("NOW-1DAY", "NOW"),
              beginPosition=("NOW-3DAY", "NOW"),
          )
      assert "duplicate" in str(excinfo.value)
  
      with pytest.raises(ValueError) as excinfo:
          SentinelAPI.format_query(
              ingestiondate=("NOW-1DAY", "NOW"),
              ingestionDate=("NOW-3DAY", "NOW"),
          )
      assert "duplicate" in str(excinfo.value)
  
      with pytest.raises(ValueError) as excinfo:
          SentinelAPI.format_query(
              area="POINT(0, 0)", footprint="POINT(0, 0)"
          )
      assert "duplicate" in str(excinfo.value)
  
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 6 for calling a global function with example usage: test_api_query_format_with_duplicates() without return types