def _schema_to_tf_dtypes_ngram(schema, ngram):
    """Returns schema as a list of tensorflow dtypes for a ngram.
    :param schema: The schema.
    :param ngram: The ngram.
    :return: tensorflow dtypes for a ngram.
    """
    result = []
    # Iterate over each timestep
    for key in sorted(ngram.fields.keys()):
        # Get schema at that timestep
        new_schema = ngram.get_schema_at_timestep(schema=schema, timestep=key)
        for field in new_schema.fields.values():
            result.append(_numpy_to_tf_dtypes(field.numpy_dtype))
    return result
Returns schema as a list of tensorflow dtypes for a ngram.
    :param schema: The schema.
    :param ngram: The ngram.
    :return: tensorflow dtypes for a ngram.
    
petastorm/tf_utils.py