def METHOD_NAME() -> Optional[redislib.Redis]:
    if not configuration.redis_enabled.value:
        return None
    instance = redislib.Redis(
        host=configuration.get_str('redis_host'),
        port=configuration.get_int('redis_port'),
        db=configuration.get_int('redis_db'),
    )
    try:
        instance.ping()
    except redislib.exceptions.ConnectionError:
        return None
    return instance