code: def test_limit_rows():
      """Test the limit_rows data transformer."""
      data = _create_dataframe(10)
      result = limit_rows(data, max_rows=20)
      assert data is result
      with pytest.raises(MaxRowsError):
          pipe(data, limit_rows(max_rows=5))
      data = _create_data_with_values(10)
      result = pipe(data, limit_rows(max_rows=20))
      assert data is result
      with pytest.raises(MaxRowsError):
          limit_rows(data, max_rows=5)
  
file_path: altair/tests/utils/test_data.py
imports: import os
  import pytest
  import pandas
  from toolz import pipe
  from altair.utils.data import limit_rows, MaxRowsError, sample, to_values, to_json, to_csv
label_desc: Use image node_id 3 for calling a global function with example usage: test_limit_rows() without return types