class_docstr: A custom TestCase which handles FLAG parsing for pytest compatibility.
class_docstr_tok: ["A","custom","TestCase","which","handles","FLAG","parsing","for","pytest","compatibility","."]
code: def get_tempdir(self, name: Optional[str] = None) -> str:
      try:
          flags.FLAGS.test_tmpdir
      except flags.UnparsedFlagAccessError:
          # Need to initialize flags when running `pytest`.
          flags.FLAGS(sys.argv, known_only=True)
      return self.create_tempdir(name).full_path
  
imports: import sys
  from typing import Optional
  from absl import flags
  from absl.testing import parameterized
label_desc: Use image node_id 1 for calling the TestCase obj's underlying member method code with example usage: obj.get_tempdir(name) and returns: self