code: def test_range_latest(client: redis.Redis):
      timeseries = client.ts()
      timeseries.create("t1")
      timeseries.create("t2")
      timeseries.createrule(
          "t1", "t2", aggregation_type="sum", bucket_size_msec=10
      )
      timeseries.add("t1", 1, 1)
      timeseries.add("t1", 2, 3)
      timeseries.add("t1", 11, 7)
      timeseries.add("t1", 13, 1)
      assert_resp_response(
          client,
          timeseries.range("t1", 0, 20),
          [(1, 1.0), (2, 3.0), (11, 7.0), (13, 1.0)],
          [[1, 1.0], [2, 3.0], [11, 7.0], [13, 1.0]],
      )
      assert_resp_response(
          client, timeseries.range("t2", 0, 10), [(0, 4.0)], [[0, 4.0]]
      )
      res = timeseries.range("t2", 0, 10, latest=True)
      assert_resp_response(
          client, res, [(0, 4.0), (10, 8.0)], [[0, 4.0], [10, 8.0]]
      )
      assert_resp_response(
          client,
          timeseries.range("t2", 0, 9, latest=True),
          [(0, 4.0)],
          [[0, 4.0]],
      )
  
imports: import math
  import time
  from time import sleep
  import pytest
  import redis
  from .conftest import assert_resp_response, is_resp2_connection, skip_ifmodversion_lt
label_desc: Use image node_id 14 for calling a global function with example usage: test_range_latest(client) without return types