def _create(self, kind):
        # type: (str) -> str
        """Create a temporary directory and store its path in self.path
        """
        # We realpath here because some systems have their default tmpdir
        # symlinked to another directory.  This tends to confuse build
        # scripts, so we canonicalize the path by traversing potential
        # symlinks here.
        path = os.path.realpath(
            tempfile.mkdtemp(prefix="pip-{}-".format(kind))
        )
        logger.debug("Created temporary directory: {}".format(path))
        return path
Create a temporary directory and store its path in self.path
        
product/gradle-plugin/src/main/python/pip/_internal/utils/temp_dir.py