def t_name_to_flan_pattern_name(t_name: str) -> str:
  """Converts `t_name` to flan `PATTERN` key.

  Some seqio tasks use the same flan patterns.
  Args:
    t_name: Task config name.

  Returns:
    a key for `PATTERNS`.
  """
  if 'para_crawl' in t_name:
    return 'para_crawl'
  elif 'wmt16_translate' in t_name:
    return 'wmt16_translate'
  elif t_name in {'arc_challenge', 'arc_easy'}:
    return 'arc'
  elif t_name in {'anli_r1', 'anli_r2', 'anli_r3'}:
    return 'anli'
  elif t_name in {'mnli_matched', 'mnli_mismatched'}:
    return 'mnli'
  return t_name