class_docstr: HttpRequest builder that sets a customized useragent header for TFX.
  
  This is used to track the usage of the TFX on Cloud AI.
class_docstr_tok: ["HttpRequest","builder","that","sets","a","customized","useragent","header","for","TFX",".","This","is","used","to","track","the","usage","of","the","TFX","on","Cloud","AI","."]
docstr: Construct a HttpRequest.
  
  Args:
      *args: Positional arguments to pass to the base class constructor.
      **kwargs: Keyword arguments to pass to the base class constructor.
docstr_tok: ["Construct","a","HttpRequest",".","Args",":","*","args",":","Positional","arguments","to","pass","to","the","base","class","constructor",".","*","*","kwargs",":","Keyword","arguments","to","pass","to","the","base","class","constructor","."]
code: def __init__(self, *args, **kwargs):
      """Construct a HttpRequest.
  
      Args:
          *args: Positional arguments to pass to the base class constructor.
          **kwargs: Keyword arguments to pass to the base class constructor.
      """
      headers = kwargs.setdefault("headers", {})
      # See Mozilla standard User Agent header Syntax:
      # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
      # TODO(b/193915978): Stop relying on '-tfxpipeline-' suffix and use
      # tfx/version instead. More labels set to scoped_labels can also be added
      # the comments variable below, upon needed.
      comments = "(client_context:tfxpipeline;)"
      user_agent = f"tfx/{version.__version__} {comments}"
      headers["user-agent"] = user_agent
      super().__init__(*args, **kwargs)
  
file_path: tfx/tfx/utils/telemetry_utils.py
imports: import contextlib
  import functools
  import re
  import sys
  import threading
  from typing import Dict, List, Any, Callable
  from absl import logging
  from googleapiclient import http
  from tfx import version
label_desc: Use image node_id 1 to create a new TFXHttpRequest object from inherited base classes: http with example: obj = TFXHttpRequest()