@staticmethod
def _apply_display_filters(trace, args):
    """
        This function looks at the disaply filters to determine which components
        should be displayed.
        """
    all_component_types = not (args.show_executions or args.show_rules or
        args.show_trigger_instances)
    if (all_component_types or args.show_trigger_instances
        ) and args.hide_noop_triggers:
        filtered_trigger_instances = []
        for trigger_instance in trace.trigger_instances:
            is_noop_trigger_instance = True
            for rule in trace.rules:
                caused_by_id = rule.get('caused_by', {}).get('id', None)
                if caused_by_id == trigger_instance['object_id']:
                    is_noop_trigger_instance = False
            if not is_noop_trigger_instance:
                filtered_trigger_instances.append(trigger_instance)
        trace.trigger_instances = filtered_trigger_instances
    if all_component_types:
        return trace
    if not args.show_executions:
        trace.action_executions = []
    if not args.show_rules:
        trace.rules = []
    if not args.show_trigger_instances:
        trace.trigger_instances = []
    return trace
