class_docstr: If no StatsLogger is configured, NoStatsLogger is used as a fallback.
class_docstr_tok: ["If","no","StatsLogger","is","configured",",","NoStatsLogger","is","used","as","a","fallback","."]
docstr: Timer metric that can be cancelled.
docstr_tok: ["Timer","metric","that","can","be","cancelled","."]
code: def timer(cls, *args, **kwargs) -> TimerProtocol:
      """Timer metric that can be cancelled."""
      return Timer()
  
file_path: airflow/airflow/metrics/base_stats_logger.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  from airflow.metrics.protocols import Timer
  from airflow.typing_compat import Protocol
label_desc: Use image node_id 5 for calling the NoStatsLogger obj's underlying member method code with example usage: obj.timer(cls) and returns: Timer