def GetTokenLists(ref_str_lists, hyp_strs, tokenize_fn=lambda s: s.split()):
  """Split tokenized strings into lists of tokens.

  Args:
    ref_str_lists: list(list(str)) of multi-reference items
    hyp_strs: list(str) hypotheses
    tokenize_fn: a function that splits a string into a list of tokens.

  Returns:
    references: tokenized references as a list(list(list(str))).
    hypotheses: tokenized hypotheses as a list(list(str)).
  """

  ref_str_lists_tokenized = [
      list(map(tokenize_fn, ref_list)) for ref_list in ref_str_lists
  ]
  hyp_strs_tokenized = list(map(tokenize_fn, hyp_strs))

  return ref_str_lists_tokenized, hyp_strs_tokenized