class_docstr: Reports telemetry for improving product experience.
class_docstr_tok: ["Reports","telemetry","for","improving","product","experience","."]
docstr: If fully_anonymous is set, use a client_id that is not unique.
docstr_tok: ["If","fully_anonymous","is","set",",","use","a","client_id","that","is","not","unique","."]
code: def __init__(
      self,
      report_levels_higher_or_equal_to: TelemetryLevel,
      fully_anonymous: bool = False,
  ) -> None:
      """If fully_anonymous is set, use a client_id that is not unique."""
      self._report_levels_higher_or_equal_to = (
          report_levels_higher_or_equal_to
      )
      self._fully_anonymous = fully_anonymous
      self._email = os.getenv(TelemetryReporter.ENV_EMAIL_OVERRIDE)
  
      if fully_anonymous:
          self._client_id = TelemetryReporter.FULLY_ANONYMOUS_CLIENT_ID
      elif self._email:
          self._client_id = self._email
      else:
          self._client_id = TelemetryReporter._create_client_id()
  
      # For testing
      self._test_handler = ToMemoryTelemetryHandler()
      self._handlers: List[TelemetryHandler] = []
  
imports: from __future__ import annotations
  import datetime
  import functools
  import logging
  import os
  import platform
  import sys
  import time
  import traceback
  import uuid
  from hashlib import sha256
  from typing import Callable, List, Optional, TypeVar
  from typing_extensions import ParamSpec
  from metricflow.random_id import random_id
  from metricflow.telemetry.handlers.handlers import TelemetryHandler, ToMemoryTelemetryHandler
  from metricflow.telemetry.handlers.python_log import PythonLoggerTelemetryHandler
  from metricflow.telemetry.models import FunctionEndEvent, FunctionStartEvent, TelemetryLevel
label_desc: Use image node_id 1 to create a new TelemetryReporter object  with example: obj = TelemetryReporter(report_levels_higher_or_equal_to, fully_anonymous)