def METHOD_NAME(endpoint, x, maxwait=20):
    for i in x:
        for _ in range(random.randint(0, maxwait)):
            yield
        yield endpoint.data.eq(int(i))
        yield endpoint.stb.eq(1)
        yield
        while not (yield endpoint.ack):
            yield
        yield endpoint.stb.eq(0)