def run_trial(exp, info):
    """Execute a block."""

    exp.s.pattern.pos = exp.p.stim_pos[int(info.stim_pos)]
    block_dur = exp.p.block_dur
    update_hz = exp.p.update_hz

    for i in range(block_dur * update_hz):

        exp.s.pattern.randomize_phases(limits=(.2, .8))
        end = info["block_time"] + (i + 1) * (1 / update_hz)

        if not i:
            info["block_onset"] = exp.clock.getTime()

        exp.wait_until(end, draw=["pattern", "fix"])
        exp.check_fixation(allow_blinks=True)
        exp.check_abort()

    return info