code: def test_transform_series() -> None:
      # default int seems to be int64, can't be encoded!
      df = pd.Series([1, 3, 5, 6, 8])
      out = bus.transform_series(df)
      assert isinstance(out, np.ndarray)
  
      df = pd.Series([1, 3, 5, 6, 8], dtype=np.int32)
      out = bus.transform_series(df)
      assert isinstance(out, np.ndarray)
  
      df = pd.Series([1.0, 3, 5, 6, 8])
      out = bus.transform_series(df)
      assert isinstance(out, np.ndarray)
  
      df = pd.Series(np.array([np.nan, np.inf, -np.inf, 0]))
      out = bus.transform_series(df)
      assert isinstance(out, np.ndarray)
  
      # boolean array
      arr = pd.array([True, False])
      assert isinstance(arr, pd.arrays.BooleanArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # string array
      arr = pd.array(["hello", "world"])
      assert isinstance(arr, pd.arrays.StringArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # floating array
      arr = pd.array([1.0, 42.0, np.nan])
      assert isinstance(arr, pd.core.arrays.floating.FloatingArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # integer array
      arr = pd.array([0, 1])
      assert isinstance(arr, pd.core.arrays.integer.IntegerArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # sparse array
      arr = pd.arrays.SparseArray([1.0, 2.0, np.nan, np.nan, 5.0])
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # datetime array
      arr = pd.array(
          [pd.NaT, datetime.datetime.today(), pd.Timestamp.today()]
      )
      assert isinstance(arr, pd.arrays.DatetimeArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # timdelta array
      arr = pd.array(
          [datetime.timedelta(seconds=1), pd.Timedelta(0, unit="s")]
      )
      assert isinstance(arr, pd.arrays.TimedeltaArray)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
      # categorical array
      arr = pd.array(
          pd.Series(["dog", "cat", "dog"]).astype("category")
      )
      assert isinstance(arr, pd.arrays.Categorical)
      out = bus.transform_series(arr)
      assert isinstance(out, np.ndarray)
  
imports: from __future__ import annotations
  import pytest
  import datetime
  from math import inf, nan
  import numpy
  import pandas
  import pytz
  from tests.support.util.env import envset
  import bokeh.util.serialization
label_desc: Use image node_id 19 for calling a global function with example usage: test_transform_series() without return types