code: def test_date_trunc_to_year(sql_client: SqlClient) -> None:
      """Tests date trunc behavior to verify that a date_trunc to YEAR outputs the first of January.
  
      This is needed because the ISO calendar chooses a year start equivalent to the Monday of the week containing
      the first Thursday of that year, which might, in fact, be in the previous calendar year. Therefore, we coerce
      to the more general calendar year standard of the first of January.
      """
      # The ISO year start for 2015 is 2014-12-29, but we should always get 2015-01-01
      ISO_DATE_STRING = "2015-06-15"
      expected = pd.Timestamp(year=2015, month=1, day=1)
      date_trunc_stmt = sql_client.sql_query_plan_renderer.expr_renderer.render_sql_expr(
          _build_date_trunc_expression(
              date_string=ISO_DATE_STRING,
              time_granularity=TimeGranularity.YEAR,
          )
      ).sql
  
      df = sql_client.query(f"SELECT {date_trunc_stmt}")
  
      actual = pd.Timestamp(_extract_dataframe_value(df=df))
      assert expected == actual
  
file_path: metricflow/metricflow/test/sql_clients/test_date_time_operations.py
imports: from __future__ import annotations
  import logging
  from typing import Any
  import pandas
  import pytest
  from dbt_semantic_interfaces.type_enums.date_part import DatePart
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.sql.sql_exprs import SqlCastToTimestampExpression, SqlDateTruncExpression, SqlExtractExpression, SqlStringLiteralExpression
  from metricflow.time.time_granularity import TimeGranularity
label_desc: Use image node_id 3 for calling a global function with example usage: test_date_trunc_to_year(sql_client) without return types