class_docstr: The MultivariateEvaluator class evaluates forecasts for multivariate or
  multi-dimensional observations.
  
  Evaluations of individual dimensions will be stored with the corresponding
  dimension prefix and contain metrics calculated only for this dimension.
  Metrics with the plain metric name correspond to metrics calculated over
  all dimensions.
  Additionally, the user can provide custom aggregation functions that
  first aggregate the target and forecast over dimensions and then calculate
  the metric. These metrics will be prefixed with m_<aggregation_fun_name>_
  
  The evaluation dimensions can be set by the user.
  
  Example:
      {'0_MSE': 0.004307240342677687, # MSE of dimension 0
      '0_abs_error': 1.6246897801756859,
      '1_MSE': 0.003949341769475723, # MSE of dimension 1
      '1_abs_error': 1.5052175521850586,
      'MSE': 0.004128291056076705, # MSE of all dimensions
      'abs_error': 3.1299073323607445,
      'm_sum_MSE': 0.02 # MSE of aggregated target and aggregated forecast
      (if target_agg_funcs is set).
      'm_sum_abs_error': 4.2}
code: def extract_target_by_dim(
      it_iterator: Iterator[pd.DataFrame], dim: int
  ) -> Iterator[pd.DataFrame]:
      for i in it_iterator:
          yield (i[dim])
  
imports: import logging
  import multiprocessing
  import sys
  from functools import partial
  from itertools import chain, tee
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, Mapping, cast
  import numpy
  import pandas
  from gluonts.gluonts_tqdm import tqdm
  from gluonts.model.forecast import Forecast, Quantile
  from gluonts.time_feature import get_seasonality
  from .metrics import abs_error, abs_target_mean, abs_target_sum, calculate_seasonal_error, coverage, mape, mase, mse, msis, quantile_loss, smape, num_masked_values
label_desc: Use image node_id 2 for calling the MultivariateEvaluator obj's underlying member method code with example usage: obj.extract_target_by_dim(it_iterator, dim) without return types