class_docstr: Base Problem for multi timeseries datasets.
class_docstr_tok: ["Base","Problem","for","multi","timeseries","datasets","."]
code: def preprocess_example(self, example, unused_mode, unused_hparams):
      # Time series are flat on disk, we un-flatten them back here.
      if self.has_inputs:
          flat_inputs = example["inputs"]
      flat_targets = example["targets"]
      c = self.normalizing_constant
      # Tensor2Tensor models expect [height, width, depth] examples, here we
      # use height for time and set width to 1 and num_series is our depth.
      if self.has_inputs:
          example["inputs"] = (
              tf.reshape(
                  flat_inputs,
                  [self.num_input_timestamps, 1, self.num_series],
              )
              * c
          )
      example["targets"] = (
          tf.reshape(
              flat_targets,
              [self.num_target_timestamps, 1, self.num_series],
          )
          * c
      )
      return example
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import timeseries_data_generator
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 14 for calling the TimeseriesProblem obj's underlying member method code with example usage: obj.preprocess_example(example, unused_mode, unused_hparams) and returns: example