code: def test_order_by(api, test_wkt):
      kwargs = dict(
          area=test_wkt,
          date=("20151219", "20160519"),
          platformname="Sentinel-2",
          cloudcoverpercentage=(0, 10),
          order_by="cloudcoverpercentage, -beginposition",
      )
      # Check that order_by works correctly also in cases where pagination is required
      expected_count = api.count(**kwargs)
      assert 100 < expected_count < 250
      products = api.query(**kwargs)
      assert len(products) == expected_count
      vals = [x["cloudcoverpercentage"] for x in products.values()]
      assert sorted(vals) == vals
      assert all(0 <= x <= 10 for x in vals)
  
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 22 for calling a global function with example usage: test_order_by(api, test_wkt) without return types