code: def genomics_testdata(path, datadir=DATADIR):
      """Gets the path to a testdata file in genomics at relative path.
  
      Args:
        path: A path to a testdata file *relative* to the genomics root
          directory. For example, if you have a test file in
          "datadir/nucleus/testdata/foo.txt", path should be
          "nucleus/testdata/foo.txt" to get a path to it.
        datadir: The path of the genomics root directory *relative* to
          the testing source directory.
  
      Returns:
        The absolute path to a testdata file.
      """
      if hasattr(FLAGS, "test_srcdir"):
          # Google code uses FLAG.test_srcdir
          # TensorFlow uses a routine googletest.test_src_dir_path.
          test_workspace = os.environ.get(
              "TEST_WORKSPACE", DEFAULT_WORKSPACE
          )
          test_srcdir = os.path.join(FLAGS.test_srcdir, test_workspace)
      else:
          # In bazel TEST_SRCDIR points at the runfiles directory, and
          # TEST_WORKSPACE names the workspace.  We need to append to the
          # path the name of the workspace in order to get to the root of our
          # source tree.
          test_workspace = os.environ["TEST_WORKSPACE"]
          test_srcdir = os.path.join(
              os.environ["TEST_SRCDIR"], test_workspace
          )
      return os.path.join(test_srcdir, datadir, 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 1 for calling a global function with example usage: genomics_testdata(path, datadir) and returns: os