code: def test_query_images_api_custom_record_ranges(
      self, input_range, total_range, used_range, count
  ):
      client = self.client
  
      query = self.isolated_query_patch()
      response = client.get(
          "/api/runs/search/images/",
          params={
              "q": query,
              "record_range": input_range,
              "record_density": 100,
              "report_progress": False,
          },
      )
      self.assertEqual(200, response.status_code)
  
      decoded_response = decode_tree(
          decode_encoded_tree_stream(
              response.iter_bytes(chunk_size=512 * 1024)
          )
      )
      self.assertEqual(1, len(decoded_response))
      run_data = decoded_response[self.run_hash]
      self.assertEqual(
          total_range, run_data["ranges"]["record_range_total"]
      )
      self.assertEqual(
          used_range, run_data["ranges"]["record_range_used"]
      )
      trace_data = run_data["traces"][0]
      self.assertEqual(count, len(trace_data["values"]))
      self.assertEqual(count, len(trace_data["iters"]))
      self.assertEqual(used_range[0], trace_data["iters"][0])
      self.assertEqual(used_range[-1] - 1, trace_data["iters"][-1])
  
imports: from parameterized import parameterized
  import random
  from tests.base import ApiTestBase
  from tests.utils import decode_encoded_tree_stream, generate_image_set
  from aim.storage.treeutils import decode_tree
  from aim.storage.context import Context
  from aim.sdk.run import Run
label_desc: Use image node_id 4 for calling the TestRunImagesSearchApi obj's underlying member method code with example usage: obj.test_query_images_api_custom_record_ranges(input_range, total_range, used_range, count) without return types