code: def test_scan_with_projection(tmp_path: Path) -> None:
      tmp_path.mkdir(exist_ok=True)
  
      json = r"""
  {"text": "\"hello", "id": 1}
  {"text": "\n{\n\t\t\"inner\": \"json\n}\n", "id": 10}
  {"id": 0, "text":"\"","date":"2013-08-03 15:17:23"}
  {"id": 1, "text":"\"123\"","date":"2009-05-19 21:07:53"}
  {"id": 2, "text":"/....","date":"2009-05-19 21:07:53"}
  {"id": 3, "text":"\n\n..","date":"2"}
  {"id": 4, "text":"\"'/\n...","date":"2009-05-19 21:07:53"}
  {"id": 5, "text":".h\"h1hh\\21hi1e2emm...","date":"2009-05-19 21:07:53"}
  {"id": 6, "text":"xxxx....","date":"2009-05-19 21:07:53"}
  {"id": 7, "text":".\"quoted text\".","date":"2009-05-19 21:07:53"}
  """
      json_bytes = bytes(json, "utf-8")
  
      file_path = tmp_path / "escape_chars.json"
      file_path.write_bytes(json_bytes)
  
      actual = (
          pl.scan_ndjson(file_path).select(["id", "text"]).collect()
      )
  
      expected = pl.DataFrame(
          {
              "id": [1, 10, 0, 1, 2, 3, 4, 5, 6, 7],
              "text": [
                  '"hello',
                  '\n{\n\t\t"inner": "json\n}\n',
                  '"',
                  '"123"',
                  "/....",
                  "\n\n..",
                  "\"'/\n...",
                  '.h"h1hh\\21hi1e2emm...',
                  "xxxx....",
                  '."quoted text".',
              ],
          }
      )
      assert_frame_equal(actual, expected)
  
file_path: polars/py-polars/tests/unit/io/test_lazy_json.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_scan_with_projection(tmp_path) without return types