def METHOD_NAME(shard_index):
    filenames_for_shard = filenames.shard(num_shards_per_host, shard_index)
    dataset = tf.data.TextLineDataset(filenames_for_shard)
    dataset = dataset.batch(batch_size, drop_remainder=True)
    dataset = dataset.map(_parse_fn, 
                          num_parallel_calls=tf.data.AUTOTUNE)
    return dataset