def METHOD_NAME() -> Optional[Text]:
  """Returns a default root path for storing temporary files during tests."""
  # `TEST_TMPDIR` and `FLAGS.test_tmpdir` are only defined only for test
  # environments. For non-test code, we use the default temporary directory.
  test_tmpdir = os.environ.get("TEST_TMPDIR")
  if test_tmpdir is None and hasattr(FLAGS, "test_tmpdir"):
    test_tmpdir = FLAGS.test_tmpdir
  if test_tmpdir is not None:
    try:
      os.makedirs(test_tmpdir)
    except FileExistsError:
      pass
  # TODO(hanuszczak): Investigate whether this check still makes sense.
  if platform.system() == "Windows":
    return None
  return test_tmpdir