code: def test_ascii_tables() -> None:
      df = pl.DataFrame(
          {"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]}
      )
  
      ascii_table_repr = (
          "shape: (3, 3)\n"
          "+-----+-----+-----+\n"
          "| a   | b   | c   |\n"
          "| --- | --- | --- |\n"
          "| i64 | i64 | i64 |\n"
          "+=================+\n"
          "| 1   | 4   | 7   |\n"
          "| 2   | 5   | 8   |\n"
          "| 3   | 6   | 9   |\n"
          "+-----+-----+-----+"
      )
      # note: expect to render ascii only within the given scope
      with pl.Config(set_ascii_tables=True):
          assert repr(df) == ascii_table_repr
  
      # confirm back to utf8 default after scope-exit
      assert (
          repr(df) == "shape: (3, 3)\n"
          "┌─────┬─────┬─────┐\n"
          "│ a   ┆ b   ┆ c   │\n"
          "│ --- ┆ --- ┆ --- │\n"
          "│ i64 ┆ i64 ┆ i64 │\n"
          "╞═════╪═════╪═════╡\n"
          "│ 1   ┆ 4   ┆ 7   │\n"
          "│ 2   ┆ 5   ┆ 8   │\n"
          "│ 3   ┆ 6   ┆ 9   │\n"
          "└─────┴─────┴─────┘"
      )
  
      @pl.Config(set_ascii_tables=True)
      def ascii_table() -> str:
          return repr(df)
  
      assert ascii_table() == ascii_table_repr
  
imports: from __future__ import annotations
  import os
  from pathlib import Path
  from typing import Any, Iterator
  import pytest
  import polars
  import polars.polars
  from polars.config import _POLARS_CFG_ENV_VARS
label_desc: Use image node_id 2 for calling a global function with example usage: test_ascii_tables() and returns: repr