code: def test_is_online(api):
      uuid = "98ca202b-2155-4181-be88-4358b2cbaaa0"
      invalid_uuid = "98ca202b-2155-4181-be88-xxxxxxxxxxxx"
  
      request_url = "https://apihub.copernicus.eu/apihub/odata/v1/Products('{}')/Online/$value"
  
      with requests_mock.mock() as rqst:
          rqst.get(
              request_url.format(uuid), text="true", status_code=200
          )
          assert api.is_online(uuid) is True
  
      with requests_mock.mock() as rqst:
          rqst.get(
              request_url.format(uuid), text="false", status_code=200
          )
          assert api.is_online(uuid) is False
  
      with pytest.raises(InvalidKeyError) as excinfo:
          api.is_online(invalid_uuid)
  
      with requests_mock.mock() as rqst:
          with pytest.raises(ServerError) as excinfo:
              rqst.get(
                  request_url.format(invalid_uuid),
                  status_code=500,
                  headers={"cause-message": "..."},
              )
              assert api.is_online(invalid_uuid)
  
      with requests_mock.mock() as rqst:
          rqst.get(
              request_url.format(invalid_uuid),
              status_code=500,
              headers={
                  "cause-message": "UriNotMatchingException : Could not find property with name: 'Online'."
              },
          )
          assert api.is_online(invalid_uuid) is True
      # assert that no more queries are made after this
      assert api.is_online(invalid_uuid) is True
  
file_path: sentinelsat/tests/test_odata.py
imports: from datetime import datetime
  import pytest
  import requests_mock
  from sentinelsat import SentinelAPI
  from sentinelsat.exceptions import InvalidKeyError, ServerError
  from sentinelsat.sentinel import _parse_odata_timestamp
  from .conftest import chain, scrub_string
label_desc: Use image node_id 8 for calling a global function with example usage: test_is_online(api) without return types