def mktemp(self):
        """
        Create a new path name which can be used for a new file or directory.

        The result is a relative path that is guaranteed to be unique within the
        current working directory.  The parent of the path will exist, but the
        path will not.

        For a temporary directory call os.mkdir on the path.  For a temporary
        file just create the file (e.g. by opening the path for writing and then
        closing it).

        @return: The newly created path
        @rtype: C{str}
        """
        MAX_FILENAME = 32 # some platforms limit lengths of filenames
        base = os.path.join(self.__class__.__module__[:MAX_FILENAME],
                            self.__class__.__name__[:MAX_FILENAME],
                            self._testMethodName[:MAX_FILENAME])
        if not os.path.exists(base):
            os.makedirs(base)
        dirname = tempfile.mkdtemp('', '', base)
        return os.path.join(dirname, 'temp')

        Create a new path name which can be used for a new file or directory.

        The result is a relative path that is guaranteed to be unique within the
        current working directory.  The parent of the path will exist, but the
        path will not.

        For a temporary directory call os.mkdir on the path.  For a temporary
        file just create the file (e.g. by opening the path for writing and then
        closing it).

        @return: The newly created path
        @rtype: C{str}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/_synctest.py