code: def _require(self, name):
      if not hasattr(self, name):
          raise TypeError(
              f"Can't use {name} for this temporary dir. "
              f'Did you forget to use "{name}" fixture?'
          )
  
imports: import os
  import pathlib
  import sys
  from contextlib import contextmanager
  from functools import partialmethod
  from dvc.utils import serialize
label_desc: Use image node_id 7 for calling the TmpDir obj's underlying member method code with example usage: obj._require(name) without return types