class_docstr: Class for the purpose of preprocessing time series.
  
  The method make_features needs to be custom-made by inherited classes.
class_docstr_tok: ["Class","for","the","purpose","of","preprocessing","time","series",".","The","method","make_features","needs","to","be","custom-made","by","inherited","classes","."]
docstr: Applies self.preprocess_from_single_ts for each time series in ts_list,
  and collates the results into self.feature_data and self.target_data.
  
  Parameters
  ----------
  ts_list: list
      List of time series, each a dict with 'target' and 'start' keys.
  change_internal_variables: bool
      If True, keep results in self.feature_data, self.target_data and
      return None.
  
  Returns
  -------
  tuple
      If change_internal_variables is False, then returns:
      list of feature datapoints, list of target datapoints
docstr_tok: ["Applies","self.preprocess_from_single_ts","for","each","time","series","in","ts_list",",","and","collates","the","results","into","self.feature_data","and","self.target_data",".","Parameters","--","--","--","--","--","ts_list",":","list","List","of","time","series",",","each","a","dict","with","'target","'","and","'start","'","keys",".","change_internal_variables",":","bool","If","True",",","keep","results","in","self.feature_data",",","self.target_data","and","return","None",".","Returns","--","--","--","-","tuple","If","change_internal_variables","is","False",",","then","returns",":","list","of","feature","datapoints",",","list","of","target","datapoints"]
code: def preprocess_from_list(
      self, ts_list, change_internal_variables: bool = True
  ) -> Optional[Tuple]:
      """
      Applies self.preprocess_from_single_ts for each time series in ts_list,
      and collates the results into self.feature_data and self.target_data.
  
      Parameters
      ----------
      ts_list: list
          List of time series, each a dict with 'target' and 'start' keys.
      change_internal_variables: bool
          If True, keep results in self.feature_data, self.target_data and
          return None.
  
      Returns
      -------
      tuple
          If change_internal_variables is False, then returns:
          list of feature datapoints, list of target datapoints
      """
      feature_data, target_data = [], []
      self.num_samples = self.get_num_samples(ts_list)
  
      if isinstance(self.cardinality, str):  # type: ignore
          self.cardinality = (
              self.infer_cardinalities(ts_list)
              if self.cardinality == "auto"  # type: ignore
              else []
          )
  
      self.infer_feature_characteristics(ts_list[0])
  
      with concurrent.futures.ProcessPoolExecutor() as executor:
          logger.info("using concurrent data preprocessing")
          for result in executor.map(
              self.preprocess_from_single_ts, ts_list
          ):
              ts_feature_data, ts_target_data = result
              # Ensure that only non-empty lists are added to the dataset
              if len(ts_target_data[0]) > 0:
                  feature_data += list(ts_feature_data)
                  target_data += list(ts_target_data)
  
      logging.info(
          "Done preprocessing. Resulting number of datapoints is: {}".format(
              len(feature_data)
          )
      )
      if change_internal_variables:
          self.feature_data = feature_data
          self.target_data = target_data
          return None
      else:
          return feature_data, target_data
  
imports: import concurrent.futures
  import logging
  from enum import Enum
  from itertools import chain, starmap
  from typing import Dict, List, Tuple, Union, Optional, Sequence
  import numpy
  from gluonts.core.component import validated
label_desc: Use image node_id 5 for calling the PreprocessGeneric obj's underlying member method code with example usage: obj.preprocess_from_list(ts_list, change_internal_variables) and returns: None, feature_data,  target_data