code: def test_byte_stream_split():
      # This is only a smoke test.
      arr_float = pa.array(list(map(float, range(100))))
      arr_int = pa.array(list(map(int, range(100))))
      data_float = [arr_float, arr_float]
      table = pa.Table.from_arrays(data_float, names=["a", "b"])
  
      # Check with byte_stream_split for both columns.
      _check_roundtrip(
          table,
          expected=table,
          compression="gzip",
          use_dictionary=False,
          use_byte_stream_split=True,
      )
  
      # Check with byte_stream_split for column 'b' and dictionary
      # for column 'a'.
      _check_roundtrip(
          table,
          expected=table,
          compression="gzip",
          use_dictionary=["a"],
          use_byte_stream_split=["b"],
      )
  
      # Check with a collision for both columns.
      _check_roundtrip(
          table,
          expected=table,
          compression="gzip",
          use_dictionary=["a", "b"],
          use_byte_stream_split=["a", "b"],
      )
  
      # Check with mixed column types.
      mixed_table = pa.Table.from_arrays(
          [arr_float, arr_int], names=["a", "b"]
      )
      _check_roundtrip(
          mixed_table,
          expected=mixed_table,
          use_dictionary=["b"],
          use_byte_stream_split=["a"],
      )
  
      # Try to use the wrong data type with the byte_stream_split encoding.
      # This should throw an exception.
      table = pa.Table.from_arrays([arr_int], names=["tmp"])
      with pytest.raises(IOError):
          _check_roundtrip(
              table,
              expected=table,
              use_byte_stream_split=True,
              use_dictionary=False,
          )
  
imports: from collections import OrderedDict
  import io
  import warnings
  from shutil import copytree
  import numpy
  import pytest
  import pyarrow
  from pyarrow import fs
  from pyarrow.filesystem import LocalFileSystem, FileSystem
  from pyarrow.tests import util
  from pyarrow.tests.parquet.common import _check_roundtrip, _roundtrip_table, _test_dataframe
label_desc: Use image node_id 20 for calling a global function with example usage: test_byte_stream_split() without return types