code: def _get_smallest(api_kwargs, cassette, online, n=3):
      time_range = (
          ("NOW-1MONTH", None) if online else (None, "20170101")
      )
      odatas = []
      with cassette:
          api = SentinelAPI(**api_kwargs)
          products = api.query(date=time_range, size="/.+KB/", limit=15)
          for uuid in products:
              odata = api.get_product_odata(uuid)
              if odata["Online"] == online:
                  odatas.append(odata)
                  if len(odatas) == n:
                      break
      assert len(odatas) == n
      return odatas
  
imports: import re
  import threading
  from datetime import datetime
  from functools import reduce
  from os import environ
  from os.path import abspath, dirname, exists, isfile, join
  import pytest
  import yaml
  from pytest_socket import disable_socket
  from vcr import VCR
  import sentinelsat
  from sentinelsat import SentinelAPI, geojson_to_wkt, read_geojson
  from .custom_serializer import BinaryContentSerializer
label_desc: Use image node_id 19 for calling a global function with example usage: _get_smallest(api_kwargs, cassette, online, n) and returns: odatas