code: def batch(xs: list):
      assert xs, "Passed data cannot be empty."
      types = set(map(type, xs))
      assert (
          len(types) == 1
      ), "All values need to be of same type, got: " + ", ".join(
          f"'{ty.__name__}'" for ty in types
      )
      ty = types.pop()
      assert ty in set(
          Batchable.__constraints__  # type: ignore
      ), f"Unsupported type: '{ty.__name__}'"
  
      return ty._batch(xs)
  
file_path: gluonts/src/gluonts/zebras/__init__.py
imports: from typing import TypeVar
  from ._freq import Freq, freq
  from ._period import period, Period, periods, Periods
  from ._split_frame import split_frame, SplitFrame, BatchSplitFrame
  from ._time_frame import time_frame, TimeFrame, BatchTimeFrame
  from ._time_series import time_series, TimeSeries, BatchTimeSeries
  from .None import schema
label_desc: Use image node_id 1 for calling a global function with example usage: batch(xs) and returns: ty