class_docstr: Functions that can be used to help render check queries in integration tests.
docstr: Render an expression like "ds >='2020-01-01' AND ds < '2020-01-02'" for start_time = stop_time = '2020-01-01'.
docstr_tok: ["Render","an","expression","like","``","ds",">","='2020-01-01","'","AND","ds","<","'2020-01-02","'","''","for","start_time","=","stop_time","=","'2020-01-01","'","."]
code: def render_time_constraint(
      self,
      expr: str,
      start_time: str,
      stop_time: str,
  ) -> str:
      """Render an expression like "ds >='2020-01-01' AND ds < '2020-01-02'" for start_time = stop_time = '2020-01-01'."""
      start_expr = self.cast_to_ts(f"{start_time}")
      time_format = "%Y-%m-%d"
      stop_time_plus_one_day = (
          datetime.datetime.strptime(stop_time, time_format)
          + datetime.timedelta(days=1)
      ).strftime(time_format)
  
      stop_expr = self.cast_to_ts(f"{stop_time_plus_one_day}")
      return f"{self.cast_expr_to_ts(expr)} >= {start_expr} AND {self.cast_expr_to_ts(expr)} < {stop_expr}"
  
imports: from __future__ import annotations
  import datetime
  import logging
  from copy import copy
  from typing import List, Optional, Sequence, Tuple
  import jinja2
  import pytest
  from dateutil import parser
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.implementations.elements.measure import PydanticMeasureAggregationParameters
  from dbt_semantic_interfaces.test_utils import as_datetime
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity
  from metricflow.engine.metricflow_engine import MetricFlowEngine, MetricFlowQueryRequest
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.plan_conversion.column_resolver import DunderColumnAssociationResolver
  from metricflow.protocols.query_parameter import DimensionOrEntityQueryParameter
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.specs.query_param_implementations import DimensionOrEntityParameter, TimeDimensionParameter
  from metricflow.sql.sql_exprs import SqlCastToTimestampExpression, SqlColumnReference, SqlColumnReferenceExpression, SqlDateTruncExpression, SqlExtractExpression, SqlGenerateUuidExpression, SqlPercentileExpression, SqlPercentileExpressionArgument, SqlPercentileFunctionType, SqlStringExpression, SqlSubtractTimeIntervalExpression
  from metricflow.test.compare_df import assert_dataframes_equal
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.integration.configured_test_case import CONFIGURED_INTEGRATION_TESTS_REPOSITORY, IntegrationTestModel, RequiredDwEngineFeatures
  from metricflow.test.time.configurable_time_source import ConfigurableTimeSource
label_desc: Use image node_id 2 for calling the CheckQueryHelpers obj's underlying member method code with example usage: obj.render_time_constraint(expr, start_time, stop_time) and returns: self, str, start_expr, str, self, str, stop_expr