def METHOD_NAME(make_stubber, monkeypatch, module_name, repeat):
    kinesis_client = boto3.client('kinesis')
    kinesis_stubber = make_stubber(kinesis_client)
    module = importlib.import_module(module_name)
    stream = module.STREAM_NAME
    data = module.get_data()
    partition_key = 'partitionkey'
    data_list = [data]
    monkeypatch.setattr(module, 'get_data', data_list.pop)
    monkeypatch.setattr(time, 'sleep', lambda x: None)
    for _ in range(repeat):
        kinesis_stubber.stub_put_record(stream, data, partition_key)
    with pytest.raises(IndexError):
        module.generate(stream, kinesis_client)