code: def test_quantile_vs_numpy(tp: type, n: int) -> None:
      a: np.ndarray[Any, Any] = np.random.randint(0, 50, n).astype(tp)
      np_result: npt.ArrayLike | None = np.median(a)
      # nan check
      if np_result != np_result:
          np_result = None
      median = pl.Series(a).median()
      if median is not None:
          assert np.isclose(median, np_result)  # type: ignore[arg-type]
      else:
          assert np_result is None
  
      q = np.random.sample()
      try:
          np_result = np.quantile(a, q)
      except IndexError:
          np_result = None
      if np_result:
          # nan check
          if np_result != np_result:
              np_result = None
          assert np.isclose(
              pl.Series(a).quantile(q, interpolation="linear"),  # type: ignore[arg-type]
              np_result,  # type: ignore[arg-type]
          )
  
imports: from __future__ import annotations
  from datetime import date, datetime, timedelta
  from typing import TYPE_CHECKING, Any
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_quantile_vs_numpy(tp, n) without return types