def get_action_result_context(action_results):
    """
    Extracts the context of action results
    :param action_results: Action results after an action is executed in Phantom
    :return: Context
    """
    ar_context = {}
    param = action_results.get_param()
    status = action_results.get_status()
    summary = action_results.get_summary()
    data = action_results.get_data()
    message = action_results.get_message()

    ar_context['param'] = param
    ar_context['status'] = status

    if data:
        ar_context['data'] = data[0]

    if summary:
        ar_context['summary'] = summary

    if message:
        ar_context['message'] = message

    return ar_context