def METHOD_NAME(connection):
    destination_info = {"service": {"name": "", "resource": "redis", "type": ""}}
    if hasattr(connection, "_pool_or_conn"):
        destination_info["port"] = int(connection._pool_or_conn.address[1])
        destination_info["address"] = connection._pool_or_conn.address[0]
    else:
        destination_info["port"] = int(connection.address[1])
        destination_info["address"] = connection.address[0]
    return destination_info