code: def _load_arff_uea(dataset_path):
      """Load arff file for uni/multi variate dataset
  
      Parameters
      ----------
      dataset_path: string of dataset_path
          Path to the ARFF file to be read
  
      Returns
      -------
      x: numpy array of shape (n_timeseries, n_timestamps, n_features)
          Time series dataset
      y: numpy array of shape (n_timeseries, )
          Vector of targets
  
      Raises
      ------
      ImportError: if the version of *Scipy* is too old (pre 1.3.0)
      Exception: on any failure, e.g. if the given file does not exist or is
                 corrupted
      """
      if not HAS_ARFF:
          raise ImportError(
              "scipy 1.3.0 or newer is required to load "
              "time series datasets from arff format."
          )
      data, meta = arff.loadarff(dataset_path)
      names = meta.names()  # ["input", "class"] for multi-variate
  
      # firstly get y_train
      y_ = data[names[-1]]  # data["class"]
      y = numpy.array(y_).astype("str")
  
      # get x_train
      if len(names) == 2:  # len=2 => multi-variate
          x_ = data[names[0]]
          x_ = numpy.asarray(x_.tolist())
  
          nb_example = x_.shape[0]
          nb_channel = x_.shape[1]
          length_one_channel = len(x_.dtype.descr)
          x = numpy.empty([nb_example, length_one_channel, nb_channel])
  
          for i in range(length_one_channel):
              # x_.dtype.descr: [('t1', '<f8'), ('t2', '<f8'), ('t3', '<f8')]
              time_stamp = x_.dtype.descr[i][0]  # ["t1", "t2", "t3"]
              x[:, i, :] = x_[time_stamp]
  
      else:  # uni-variate situation
          x_ = data[names[:-1]]
          x = numpy.asarray(x_.tolist(), dtype=float)
          x = x.reshape(len(x), -1, 1)
  
      return x, y
  
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 12 for calling a global function with example usage: _load_arff_uea(dataset_path) and returns: x,  y