code: def test_format_order_by():
      res = _format_order_by("cloudcoverpercentage")
      assert res == "cloudcoverpercentage asc"
  
      res = _format_order_by("+cloudcoverpercentage,-beginposition")
      assert res == "cloudcoverpercentage asc,beginposition desc"
  
      res = _format_order_by(" +cloudcoverpercentage, -beginposition ")
      assert res == "cloudcoverpercentage asc,beginposition desc"
  
      with pytest.raises(ValueError):
          _format_order_by("+cloudcoverpercentage-beginposition")
  
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 14 for calling a global function with example usage: test_format_order_by() without return types