class_docstr: Create new connection to Segment and allows you to pull data out of Segment or write to it.
  
  You can then use that file with other
  Airflow operators to move the data around or interact with segment.
  
  :param segment_conn_id: the name of the connection that has the parameters
      we need to connect to Segment. The connection should be type `json` and include a
      write_key security token in the `Extras` field.
  :param segment_debug_mode: Determines whether Segment should run in debug mode.
      Defaults to False
  
  .. note::
      You must include a JSON structure in the `Extras` field.
      We need a user's security token to connect to Segment.
      So we define it in the `Extras` field as:
      `{"write_key":"YOUR_SECURITY_TOKEN"}`
code: def get_conn(self) -> analytics:
      self.log.info(
          "Setting write key for Segment analytics connection"
      )
      analytics.debug = self.segment_debug_mode
      if self.segment_debug_mode:
          self.log.info(
              "Setting Segment analytics connection to debug mode"
          )
      analytics.on_error = self.on_error
      analytics.write_key = self.write_key
      return analytics
  
file_path: airflow/airflow/providers/segment/hooks/segment.py
imports: from __future__ import annotations
  import analytics
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 2 for calling the SegmentHook obj's underlying member method code with example usage: obj.get_conn() and returns: analytics