docstr: Writes test data to temporary files.
  
  Args:
    name: str, used for making temp files unique across tests
    hyps: list of unicode strings serving as translation hypotheses
    refs: list of unicode strings serving as references
  
  Returns:
    hyp_file: path to temporary file containing the hypotheses
    refs_file: path to temporary file containing the references
docstr_tok: ["Writes","test","data","to","temporary","files",".","Args",":","name",":","str",",","used","for","making","temp","files","unique","across","tests","hyps",":","list","of","unicode","strings","serving","as","translation","hypotheses","refs",":","list","of","unicode","strings","serving","as","references","Returns",":","hyp_file",":","path","to","temporary","file","containing","the","hypotheses","refs_file",":","path","to","temporary","file","containing","the","references"]
code: def _generate_test_data(self, name, hyps, refs):
      """Writes test data to temporary files.
  
      Args:
        name: str, used for making temp files unique across tests
        hyps: list of unicode strings serving as translation hypotheses
        refs: list of unicode strings serving as references
  
      Returns:
        hyp_file: path to temporary file containing the hypotheses
        refs_file: path to temporary file containing the references
      """
      assert len(hyps) == len(refs)
      hyp_file = os.path.join(
          tempfile.gettempdir(), "{}.hyps".format(name)
      )
      refs_file = os.path.join(
          tempfile.gettempdir(), "{}.refs".format(name)
      )
      for filename, items in zip([hyp_file, refs_file], [hyps, refs]):
          with (
              open(filename, "wb")
              if six.PY2
              else open(filename, "w", encoding="utf-8")
          ) as out:
              content = text_encoder.unicode_to_native("\n".join(items))
              out.write(content)
      return hyp_file, refs_file
  
file_path: tensor2tensor/tensor2tensor/utils/bleu_hook_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  import six
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.utils import bleu_hook
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the BleuHookTest obj's underlying member method code with example usage: obj._generate_test_data(name, hyps, refs) and returns: hyp_file,  refs_file