docstr: Returns true if any of the specs correspond to a cumulative metric or a derived metric with time offset.
docstr_tok: ["Returns","true","if","any","of","the","specs","correspond","to","a","cumulative","metric","or","a","derived","metric","with","time","offset","."]
code: def contains_cumulative_or_time_offset_metric(
      self, metric_references: Sequence[MetricReference]
  ) -> bool:
      """Returns true if any of the specs correspond to a cumulative metric or a derived metric with time offset."""
      for metric_reference in metric_references:
          metric = self.get_metric(metric_reference)
          if metric.type == MetricType.CUMULATIVE:
              return True
          elif metric.type == MetricType.DERIVED:
              for input_metric in metric.type_params.metrics or []:
                  if (
                      input_metric.offset_window
                      or input_metric.offset_to_grain
                  ):
                      return True
      return False
  
imports: from __future__ import annotations
  import logging
  from typing import Dict, FrozenSet, Optional, Sequence, Set
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.protocols.metric import Metric, MetricInputMeasure, MetricType
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from dbt_semantic_interfaces.references import MeasureReference, MetricReference
  from metricflow.errors.errors import DuplicateMetricError, MetricNotFoundError, NonExistentMeasureError
  from metricflow.model.semantics.linkable_element_properties import LinkableElementProperties
  from metricflow.model.semantics.linkable_spec_resolver import LinkableElementSet, ValidLinkableSpecResolver
  from metricflow.model.semantics.semantic_model_join_evaluator import MAX_JOIN_HOPS
  from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup
  from metricflow.protocols.semantics import MetricAccessor
  from metricflow.specs.specs import LinkableInstanceSpec
label_desc: Use image node_id 11 for calling the MetricLookup obj's underlying member method code with example usage: obj.contains_cumulative_or_time_offset_metric(metric_references) and returns: False, True, True