def execute_before(self, sensor_graph, scope_stack):
        """Execute statement before children are executed.

        Args:
            sensor_graph (SensorGraph): The sensor graph that we are building or
                modifying
            scope_stack (list(Scope)): A stack of nested scopes that may influence
                how this statement allocates clocks or other stream resources.
        """

        parent = scope_stack[-1]
        alloc = parent.allocator

        stream_a, trigger_a = self._convert_trigger(self.trigger_a, parent)

        if self.trigger_b is None:
            new_scope = TriggerScope(sensor_graph, scope_stack, (stream_a, trigger_a))
        else:
            stream_b, trigger_b = self._convert_trigger(self.trigger_b, parent)
            trigger_stream = alloc.allocate_stream(DataStream.UnbufferedType)

            if self.combiner == u'and':
                combiner = '&&'
            else:
                combiner = '||'

            if stream_a.input and not stream_b.input:
                unbuffered_stream = alloc.allocate_stream(DataStream.UnbufferedType, attach=True)
                sensor_graph.add_node(u"({} always) => {} using copy_latest_a".format(stream_a, unbuffered_stream))
                sensor_graph.add_node(u"({} {} {} {} {}) => {} using copy_latest_a".format(unbuffered_stream, trigger_a, combiner, stream_b, trigger_b, trigger_stream))
            elif stream_b.input and not stream_a.input:
                unbuffered_stream = alloc.allocate_stream(DataStream.UnbufferedType, attach=True)
                sensor_graph.add_node(u"({} always) => {} using copy_latest_a".format(stream_b, unbuffered_stream))
                sensor_graph.add_node(u"({} {} {} {} {}) => {} using copy_latest_a".format(stream_a, trigger_a, combiner, unbuffered_stream, trigger_b, trigger_stream))
            else:
                sensor_graph.add_node(u"({} {} {} {} {}) => {} using copy_latest_a".format(stream_a, trigger_a, combiner, stream_b, trigger_b, trigger_stream))
            new_scope = TriggerScope(sensor_graph, scope_stack, (trigger_stream, TrueTrigger()))

        scope_stack.append(new_scope)