code: def connect_redis(host, port):
      redis_cache = redis.Redis(host=host, port=port)
      if not redis_cache.ping():
          raise ConnectionError("Cannot connect to redis")
      return redis_cache
  
file_path: modelkit/modelkit/utils/redis.py
imports: from dataclasses import dataclass
  from typing import Callable
  from structlog import get_logger
  from tenacity import retry, retry_if_exception, stop_after_attempt, wait_random_exponential
label_desc: Use image node_id 3 for calling a global function with example usage: connect_redis(host, port) and returns: redis_cache