code: def test_alter(client):
      assert client.ts().create(1)
      info = client.ts().info(1)
      assert_resp_response(
          client,
          0,
          info.get("retention_msecs"),
          info.get("retentionTime"),
      )
      assert client.ts().alter(1, retention_msecs=10)
      assert {} == client.ts().info(1)["labels"]
      info = client.ts().info(1)
      assert_resp_response(
          client,
          10,
          info.get("retention_msecs"),
          info.get("retentionTime"),
      )
      assert client.ts().alter(1, labels={"Time": "Series"})
      assert "Series" == client.ts().info(1)["labels"]["Time"]
      info = client.ts().info(1)
      assert_resp_response(
          client,
          10,
          info.get("retention_msecs"),
          info.get("retentionTime"),
      )
  
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 4 for calling a global function with example usage: test_alter(client) without return types