def __init__(self, schema, schema_data_generator, ngram=None):
        """Initializes a reader object.

        :param schema: unischema instance
        :param schema_data_generator: A function that takes names of fields in unischema and returns the actual
                values that complies with the schema.
        """
        self.schema = schema
        self.schema_data_generator = schema_data_generator
        if ngram is not None:
            raise ValueError('Sequence argument not supported for ReaderMock')
        self.ngram = ngram
        self.batched_output = False
Initializes a reader object.

        :param schema: unischema instance
        :param schema_data_generator: A function that takes names of fields in unischema and returns the actual
                values that complies with the schema.
        
petastorm/test_util/reader_mock.py