code: def _series_from_values(values):
      return TimeSeries.from_values(
          np.array(values) if isinstance(values, list) else values
      )
  
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from darts.dataprocessing import dtw
  from darts.metrics import dtw_metric, mae, mape
  from darts.timeseries import TimeSeries
  from darts.utils import timeseries_generation
label_desc: Use image node_id 1 for calling a global function with example usage: _series_from_values(values) and returns: TimeSeries