def selection_sampler(result=0):
    """ A sampler always returning the measurement result `result`, and not
    making any measurement errors. Useful for testing or state preparation.

    See also: Measurement
    """
    while True:
        yield result, result, 1
