code: def test_query(db):
      import sqlalchemy as sa
      from sqlalchemy import sql
  
      s1 = sql.select(
          sql.column("number"), sql.column("name")
      ).select_from(sql.table("test"))
      out = read_sql_query(s1, db, npartitions=2, index_col="number")
      assert_eq(out, df[["name"]])
  
      s2 = (
          sql.select(
              sa.cast(sql.column("number"), sa.types.BigInteger).label(
                  "number"
              ),
              sql.column("name"),
          )
          .where(sql.column("number") >= 5)
          .select_from(sql.table("test"))
      )
  
      out = read_sql_query(s2, db, npartitions=2, index_col="number")
      assert_eq(out, df.loc[5:, ["name"]])
  
imports: from __future__ import annotations
  import io
  import sys
  from contextlib import contextmanager
  import pytest
  from dask.dataframe.io.sql import read_sql, read_sql_query, read_sql_table
  from dask.dataframe.utils import assert_eq, get_string_dtype
  from dask.utils import tmpfile
label_desc: Use image node_id 17 for calling a global function with example usage: test_query(db) without return types