code: def _standard_input(metrics, y_true, y_pred):
      """
      Standardize input functions. Format metrics,
      check the ndim of y_pred and y_true,
      converting 1-3 dim y_true and y_pred to 2 dim.
      """
      if not isinstance(metrics, list):
          metrics = [metrics]
      if isinstance(metrics[0], str):
          metrics = list(map(lambda x: x.lower(), metrics))
          invalidInputError(
              all(
                  metric in REGRESSION_MAP.keys() for metric in metrics
              ),
              f"metric should be one of {REGRESSION_MAP.keys()},"
              f" but get {metrics}.",
          )
          invalidInputError(
              type(y_true) is type(y_pred)
              and isinstance(y_pred, ndarray),
              "y_pred and y_true type must be numpy.ndarray,"
              f" but found {type(y_pred)} and {type(y_true)}.",
          )
  
      invalidInputError(
          y_true.shape == y_pred.shape,
          "y_true and y_pred should have the same shape, "
          f"but get {y_true.shape} and {y_pred.shape}.",
      )
  
      if y_true.ndim == 1:
          y_true = y_true.reshape(-1, 1)
          y_pred = y_pred.reshape(-1, 1)
          original_shape = y_true.shape
      elif y_true.ndim == 3:
          original_shape = y_true.shape
          y_true = y_true.reshape(
              y_true.shape[0], y_true.shape[1] * y_true.shape[2]
          )
          y_pred = y_pred.reshape(
              y_pred.shape[0], y_pred.shape[1] * y_pred.shape[2]
          )
      else:
          original_shape = y_true.shape
      return metrics, y_true, y_pred, original_shape
  
file_path: BigDL/python/chronos/src/bigdl/chronos/metric/forecast_metrics.py
imports: from numpy import ndarray
  import numpy
  from bigdl.nano.utils.common import invalidInputError
  from timeit import repeat
  import random
label_desc: Use image node_id 7 for calling a global function with example usage: _standard_input(metrics, y_true, y_pred) and returns: metrics,  y_true,  y_pred,  original_shape