class_docstr: CloudwatchTaskHandler is a python log handler that handles and reads task instance logs.
  
  It extends airflow FileTaskHandler and uploads to and reads from Cloudwatch.
  
  :param base_log_folder: base folder to store logs locally
  :param log_group_arn: ARN of the Cloudwatch log group for remote log storage
      with format ``arn:aws:logs:{region name}:{account id}:log-group:{group name}``
  :param filename_template: template for file name (local storage) or log stream name (remote)
code: def __init__(
      self,
      base_log_folder: str,
      log_group_arn: str,
      filename_template: str | None = None,
  ):
      super().__init__(base_log_folder, filename_template)
      split_arn = log_group_arn.split(":")
  
      self.handler = None
      self.log_group = split_arn[6]
      self.region_name = split_arn[3]
      self.closed = False
  
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from functools import cached_property
  from typing import TYPE_CHECKING, Any
  import watchtower
  from airflow.configuration import conf
  from airflow.providers.amazon.aws.hooks.logs import AwsLogsHook
  from airflow.providers.amazon.aws.utils import datetime_to_epoch_utc_ms
  from airflow.utils.log.file_task_handler import FileTaskHandler
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 1 to create a new CloudwatchTaskHandler object from inherited base classes: FileTaskHandler, LoggingMixin with example: obj = CloudwatchTaskHandler(base_log_folder, log_group_arn, filename_template)