def sample(self, *exprs) -> 'TriggerCombination':
        """Sample signals when a trigger from this combination is activated.

        This method returns a new :class:`TriggerCombination` object. When awaited, this object
        returns, in addition to the values that would be returned by :py:`await trigger`, the values
        of :py:`exprs` at exactly the moment at which the wait has completed.

        Combining :meth:`~SimulatorContext.delay`, :meth:`~SimulatorContext.changed`, or
        :meth:`~SimulatorContext.edge` with :meth:`sample` can be used to capture the state of
        a circuit at the moment of the event: ::

            async for arst_edge, delay_expired, in_a_value, in_b_value in \\
                    ctx.posedge(arst).delay(1e-3).sample(in_a, in_b):
                ...

        Chaining calls to :meth:`sample` has the same effect as calling it once with the combined
        list of arguments. The code below has the same behavior as the code above: ::

            async for arst_edge, delay_expired, in_a_value, in_b_value in \\
                    ctx.posedge(arst).delay(1e-3).sample(in_a).sample(in_b):
                ...

        .. note::

            Chaining calls to this method is useful for defining reusable building blocks. See
            the documentation for :meth:`TickTrigger.sample` for a detailed example.
        """
        return TriggerCombination(self._engine, self._process, triggers=self._triggers +
            tuple(SampleTrigger(value) for value in exprs))
Sample signals when a trigger from this combination is activated.

        This method returns a new :class:`TriggerCombination` object. When awaited, this object
        returns, in addition to the values that would be returned by :py:`await trigger`, the values
        of :py:`exprs` at exactly the moment at which the wait has completed.

        Combining :meth:`~SimulatorContext.delay`, :meth:`~SimulatorContext.changed`, or
        :meth:`~SimulatorContext.edge` with :meth:`sample` can be used to capture the state of
        a circuit at the moment of the event: ::

            async for arst_edge, delay_expired, in_a_value, in_b_value in \
                    ctx.posedge(arst).delay(1e-3).sample(in_a, in_b):
                ...

        Chaining calls to :meth:`sample` has the same effect as calling it once with the combined
        list of arguments. The code below has the same behavior as the code above: ::

            async for arst_edge, delay_expired, in_a_value, in_b_value in \
                    ctx.posedge(arst).delay(1e-3).sample(in_a).sample(in_b):
                ...

        .. note::

            Chaining calls to this method is useful for defining reusable building blocks. See
            the documentation for :meth:`TickTrigger.sample` for a detailed example.
        
amaranth/sim/_async.py