code: def test_as_df(table_snapshot: SqlTableSnapshot) -> None:
      """Check that SqlTableSnapshot.as_df works as expected."""
      assert_dataframes_equal(
          actual=table_snapshot.as_df,
          expected=pd.DataFrame(
              columns=[f"col{i}" for i in range(5)],
              data=(
                  (True, 1, 1.0, as_datetime("2020-01-02"), "hi"),
                  (
                      False,
                      -1,
                      -1.0,
                      as_datetime("2020-03-04 05:06:07"),
                      "bye",
                  ),
              ),
          ),
      )
  
file_path: metricflow/metricflow/test/table_snapshot/test_table_snapshots.py
imports: from __future__ import annotations
  import os
  from pathlib import Path
  import pandas
  import pytest
  from dbt_semantic_interfaces.test_utils import as_datetime
  from metricflow.protocols.sql_client import SqlEngine
  from metricflow.random_id import random_id
  from metricflow.test.compare_df import assert_dataframes_equal
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods
  from metricflow.test.table_snapshot.table_snapshots import SqlTableColumnDefinition, SqlTableColumnType, SqlTableSnapshot, SqlTableSnapshotLoader, SqlTableSnapshotRepository
label_desc: Use image node_id 2 for calling a global function with example usage: test_as_df(table_snapshot) without return types