class_docstr: Factory for temporary directories under the common base temp directory.
  
  The base directory can be configured using the ``--basetemp`` option.
class_docstr_tok: ["Factory","for","temporary","directories","under","the","common","base","temp","directory",".","The","base","directory","can","be","configured","using","the","``","--","basetemp","``","option","."]
docstr: makes a temporary directory managed by the factory
docstr_tok: ["makes","a","temporary","directory","managed","by","the","factory"]
code: def mktemp(self, basename, numbered=True):
      """makes a temporary directory managed by the factory"""
      if not numbered:
          p = self.getbasetemp().joinpath(basename)
          p.mkdir()
      else:
          p = make_numbered_dir(
              root=self.getbasetemp(), prefix=basename
          )
          self._trace("mktemp", p)
      return p
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import tempfile
  import warnings
  import attr
  import py
  import six
  import pytest
  from .pathlib import ensure_reset_dir
  from .pathlib import LOCK_TIMEOUT
  from .pathlib import make_numbered_dir
  from .pathlib import make_numbered_dir_with_cleanup
  from .pathlib import Path
  from _pytest.monkeypatch import MonkeyPatch
label_desc: Use image node_id 2 for calling the TempPathFactory obj's underlying member method code with example usage: obj.mktemp(basename, numbered) and returns: p