class_docstr: The MultivariateGrouper takes a univariate dataset and groups it into a
  single multivariate time series. Therefore, this class allows the user to
  convert a univariate dataset into a multivariate dataset without making a
  separate copy of the dataset.
  
  The Multivariate Grouper has two different modes:
  
  Training: For training data, the univariate time series get aligned to the
  earliest time stamp in the dataset. Time series will be left and right
  padded to produce an array of shape (dim, num_time_steps)
  
  Test: The test dataset might have multiple start dates (usually because
  the test dataset mimics a rolling evaluation scenario). In this case,
  the univariate dataset will be split into n multivariate time series,
  where n is the number of evaluation dates. Again, the
  time series will be grouped but only left padded. Note that the
  padded value will influence the prediction if the context length is
  longer than the length of the time series.
  
  Rules for padding for training and test datasets can be specified by the
  user.
  
  Parameters
  ----------
  max_target_dim
      Set maximum dimensionality (for faster testing or when hitting
      constraints of multivariate model). Takes the last max_target_dim
      time series and groups them to multivariate time series.
  num_test_dates
      Number of test dates in the test set. This can be more than one if
      the test set contains more than one forecast start date (often the
      case in a rolling evaluation scenario). Must be set to convert test
      data.
  train_fill_rule
      Implements the rule that fills missing data after alignment of the
      time series for the training dataset.
  test_fill_rule
      Implements the rule that fills missing data after alignment of the
      time series for the test dataset.
class_docstr_tok: ["The","MultivariateGrouper","takes","a","univariate","dataset","and","groups","it","into","a","single","multivariate","time","series",".","Therefore",",","this","class","allows","the","user","to","convert","a","univariate","dataset","into","a","multivariate","dataset","without","making","a","separate","copy","of","the","dataset",".","The","Multivariate","Grouper","has","two","different","modes",":","Training",":","For","training","data",",","the","univariate","time","series","get","aligned","to","the","earliest","time","stamp","in","the","dataset",".","Time","series","will","be","left","and","right","padded","to","produce","an","array","of","shape","(","dim",",","num_time_steps",")","Test",":","The","test","dataset","might","have","multiple","start","dates","(","usually","because","the","test","dataset","mimics","a","rolling","evaluation","scenario",")",".","In","this","case",",","the","univariate","dataset","will","be","split","into","n","multivariate","time","series",",","where","n","is","the","number","of","evaluation","dates",".","Again",",","the","time","series","will","be","grouped","but","only","left","padded",".","Note","that","the","padded","value","will","influence","the","prediction","if","the","context","length","is","longer","than","the","length","of","the","time","series",".","Rules","for","padding","for","training","and","test","datasets","can","be","specified","by","the","user",".","Parameters","--","--","--","--","--","max_target_dim","Set","maximum","dimensionality","(","for","faster","testing","or","when","hitting","constraints","of","multivariate","model",")",".","Takes","the","last","max_target_dim","time","series","and","groups","them","to","multivariate","time","series",".","num_test_dates","Number","of","test","dates","in","the","test","set",".","This","can","be","more","than","one","if","the","test","set","contains","more","than","one","forecast","start","date","(","often","the","case","in","a","rolling","evaluation","scenario",")",".","Must","be","set","to","convert","test","data",".","train_fill_rule","Implements","the","rule","that","fills","missing","data","after","alignment","of","the","time","series","for","the","training","dataset",".","test_fill_rule","Implements","the","rule","that","fills","missing","data","after","alignment","of","the","time","series","for","the","test","dataset","."]
code: def _transform_target(funcs, dataset: Dataset) -> DataEntry:
      return {FieldName.TARGET: [funcs(data) for data in dataset]}
  
imports: import logging
  from typing import Callable, Optional
  import numpy
  import pandas
  from gluonts.itertools import batcher
  from gluonts.core.component import validated
  from gluonts.dataset.common import DataEntry, Dataset, ListDataset
  from gluonts.dataset.field_names import FieldName
label_desc: Use image node_id 9 for calling the MultivariateGrouper obj's underlying member method code with example usage: obj._transform_target(funcs, dataset) and returns: dict