code: def str_to_time_series(ts_str):
      """Reads a time series from its string representation (used when loading
      time series from disk).
  
      Parameters
      ----------
      ts_str : string
          String representation of the time-series.
  
      Returns
      -------
      numpy.ndarray
          Represented time-series.
  
      Examples
      --------
      >>> str_to_time_series("1 2 3 4")
      array([[1.],
             [2.],
             [3.],
             [4.]])
      >>> str_to_time_series("1 2|3 4")
      array([[1., 3.],
             [2., 4.]])
  
      See Also
      --------
      load_time_series_txt : Load time series from disk
      time_series_to_str : Transform a time series into a string
      """
      dimensions = ts_str.split("|")
      ts = [
          numpy.fromstring(dim_str, sep=" ") for dim_str in dimensions
      ]
      return to_time_series(numpy.transpose(ts))
  
imports: import warnings
  from io import StringIO
  import numpy
  from sklearn.base import TransformerMixin
  from sklearn.utils import column_or_1d
  from sklearn.utils.validation import check_is_fitted
  from tslearn.backend import instantiate_backend
  from tslearn.bases import TimeSeriesBaseEstimator
label_desc: Use image node_id 5 for calling a global function with example usage: str_to_time_series(ts_str) and returns: to_time_series