code: def tmp_path(request, tmp_path_factory):
      """Return a temporary directory path object
      which is unique to each test function invocation,
      created as a sub directory of the base temporary
      directory.  The returned object is a :class:`pathlib.Path`
      object.
  
      .. note::
  
          in python < 3.6 this is a pathlib2.Path
      """
  
      return _mk_tmp(request, tmp_path_factory)
  
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 7 for calling a global function with example usage: tmp_path(request, tmp_path_factory) and returns: _mk_tmp