title: Another use case of funtools.partial in T5 tutorial code
body: <p>I was reading this code. From <code>T5</code> <a href="https://colab.research.google.com/github/google-research/text-to-text-transfer-transformer/blob/master/notebooks/t5-trivia.ipynb" rel="nofollow noreferrer">tutorial</a>.. I found this snippet.</p>
  
  <pre><code>def nq_dataset_fn(split, shuffle_files=False):
    # We only have one file for each split.
    del shuffle_files
  
    # Load lines from the text file as examples.
    ds = tf.data.TextLineDataset(nq_tsv_path[split])
    # Split each "&lt;question&gt;\t&lt;answer&gt;" example into (question, answer) tuple.
    ds = ds.map(
        functools.partial(tf.io.decode_csv, record_defaults=["", ""],
                          field_delim="\t", use_quote_delim=False),
        num_parallel_calls=tf.data.experimental.AUTOTUNE)
    # Map each tuple to a {"question": ... "answer": ...} dict.
    ds = ds.map(lambda *ex: dict(zip(["question", "answer"], ex)))
    return ds
  </code></pre>
  
  <p>What did I understand reading this? Well, <code>functools.partial</code> is used for creating a wrapper around some known to manipulate the arguments or to reduce the number of arguments, but what is the use case here? It is confusing, given that we could simply call <code>tf.io.decode_csv</code>? </p>