class_docstr: A class to proxy a node connection to a different port
class_docstr_tok: ["A","class","to","proxy","a","node","connection","to","a","different","port"]
code: def __init__(self, addr, redis_addr):
      self.addr = addr
      self.redis_addr = redis_addr
      self.send_event = asyncio.Event()
      self.server = None
      self.task = None
      self.n_connections = 0
  
imports: import asyncio
  import binascii
  import datetime
  import warnings
  from typing import Any, Awaitable, Callable, Dict, List, Optional, Type, Union
  from urllib.parse import urlparse
  import pytest
  import pytest_asyncio
  from _pytest.fixtures import FixtureRequest
  from redis._parsers import AsyncCommandsParser
  from redis.asyncio.cluster import ClusterNode, NodesManager, RedisCluster
  from redis.asyncio.connection import Connection, SSLConnection, async_timeout
  from redis.asyncio.retry import Retry
  from redis.backoff import ExponentialBackoff, NoBackoff, default_backoff
  from redis.cluster import PIPELINE_BLOCKED_COMMANDS, PRIMARY, REPLICA, get_node_name
  from redis.crc import REDIS_CLUSTER_HASH_SLOTS, key_slot
  from redis.exceptions import AskError, ClusterDownError, ConnectionError, DataError, MaxConnectionsError, MovedError, NoPermissionError, RedisClusterException, RedisError, ResponseError
  from redis.utils import str_if_bytes
  from tests.conftest import assert_resp_response, is_resp2_connection, skip_if_redis_enterprise, skip_if_server_version_gte, skip_if_server_version_lt, skip_unless_arch_bits
  from ..ssl_utils import get_ssl_filename
  from .compat import aclosing, mock
label_desc: Use image node_id 1 to create a new NodeProxy object  with example: obj = NodeProxy(addr, redis_addr)