code: def test_tmpfile(name, contents=None):
      """Returns a path to a tempfile named name in the test_tmpdir.
  
      Args:
        name: str; the name of the file, should not contain any slashes.
        contents: bytes, or None. If not None, tmpfile's contents will be set to
          contents before returning the path.
  
      Returns:
        str path to a tmpfile with filename name in our test tmpfile directory.
      """
      path = os.path.join(absltest.get_default_test_tmpdir(), name)
      if contents is not None:
          epath.Path(path).write_text(contents)
      return path
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import flags
  from absl.testing import absltest
  from etils import epath
  import six
  from third_party.nucleus.protos import position_pb2
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.protos import struct_pb2
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import cigar
label_desc: Use image node_id 3 for calling a global function with example usage: test_tmpfile(name, contents) and returns: path