def METHOD_NAME(redshift_cluster_id, redshift_user, redshift_database_name, region, query):
    """
    Executes redshift query and gets response for query when finished
    """
    # get query id
    redshift_data_api_client =  boto3.client("redshift-data", region)
    response_execute_statement = redshift_data_api_client.execute_statement(
        Database=redshift_database_name,
        DbUser=redshift_user,
        Sql=query,
        ClusterIdentifier=redshift_cluster_id,
    )
    query_id = response_execute_statement["Id"]
    # get query status
    response_describe_statement = redshift_data_api_client.describe_statement(
        Id=query_id
    )
    query_done = False
    while not query_done:
        response_describe_statement = (
            redshift_data_api_client.describe_statement(Id=query_id)
        )
        query_status = response_describe_statement["Status"]
        if query_status == "FAILED":
            logger.debug(f"SQL execution failed. Query ID = {query_id}")
            raise Exception
        elif query_status == "FINISHED":
            query_done = True
            # log result if there is a result (typically from Select statement)
            if response_describe_statement["HasResultSet"]:
                response_get_statement_result = (
                    redshift_data_api_client.get_statement_result(Id=query_id)
                )
    return response_get_statement_result