def METHOD_NAME(self):
    result = {"version": "unknown", "pip": "unknown"}
    # determine python version
    try:
        result["version"] = get_python_version_string()
    except Exception:
        self._logger.exception("Error detecting python version")
    # determine if we are running from a virtual environment
    try:
        if hasattr(sys, "real_prefix") or (
            hasattr(sys, "base_prefix")
            and os.path.realpath(sys.prefix) != os.path.realpath(sys.base_prefix)
        ):
            result["virtualenv"] = sys.prefix
    except Exception:
        self._logger.exception(
            "Error detecting whether we are running in a virtual environment"
        )
    # try to find pip version
    try:
        import pkg_resources
        result["pip"] = pkg_resources.get_distribution("pip").version
    except Exception:
        self._logger.exception("Error detecting pip version")
    return result