code: def test_change_username_password_on_existing_connection(
      self, r, request
  ):
      username = "origin_username"
      password = "origin_password"
      new_username = "new_username"
      new_password = "new_password"
  
      def teardown():
          r.acl_deluser(new_username)
  
      request.addfinalizer(teardown)
  
      init_acl_user(r, request, username, password)
      r2 = _get_client(
          redis.Redis,
          request,
          flushdb=False,
          username=username,
          password=password,
      )
      assert r2.ping() is True
      conn = r2.connection_pool.get_connection("_")
      conn.send_command("PING")
      assert str_if_bytes(conn.read_response()) == "PONG"
      assert conn.username == username
      assert conn.password == password
      init_acl_user(r, request, new_username, new_password)
      conn.password = new_password
      conn.username = new_username
      conn.send_command("PING")
      assert str_if_bytes(conn.read_response()) == "PONG"
  
imports: import functools
  import random
  import string
  from typing import Optional, Tuple, Union
  import pytest
  import redis
  from redis import AuthenticationError, DataError, ResponseError
  from redis.credentials import CredentialProvider, UsernamePasswordCredentialProvider
  from redis.utils import str_if_bytes
  from tests.conftest import _get_client, skip_if_redis_enterprise
label_desc: Use image node_id 7 for calling the TestCredentialsProvider obj's underlying member method code with example usage: obj.test_change_username_password_on_existing_connection(r, request) without return types