code: def _get_column_order_and_datatype(
      metric_types: Dict,
      return_data: bool = True,
      cutoff_dtype=None,
      old_naming=True,
  ) -> Dict:
      """Get the ordered column name and input datatype of results."""
      others_metadata = {
          "len_train_window": "int",
          "cutoff": cutoff_dtype,
      }
      y_metadata = {
          "y_train": "object",
          "y_test": "object",
      }
      fit_metadata, metrics_metadata = {"fit_time": "float"}, {}
      for scitype in metric_types:
          for metric in metric_types.get(scitype):
              pred_args = _get_pred_args_from_metric(scitype, metric)
              if pred_args == {} or old_naming:
                  time_key = f"{scitype}_time"
                  result_key = f"test_{metric.name}"
                  y_pred_key = f"y_{scitype}"
              else:
                  argval = list(pred_args.values())[0]
                  time_key = f"{scitype}_{argval}_time"
                  result_key = f"test_{metric.name}_{argval}"
                  y_pred_key = f"y_{scitype}_{argval}"
              fit_metadata[time_key] = "float"
              metrics_metadata[result_key] = "float"
              if return_data:
                  y_metadata[y_pred_key] = "object"
      fit_metadata.update(others_metadata)
      if return_data:
          fit_metadata.update(y_metadata)
      metrics_metadata.update(fit_metadata)
      return metrics_metadata.copy()
  
file_path: sktime/sktime/forecasting/model_evaluation/_functions.py
imports: import time
  import warnings
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from sktime.datatypes import check_is_scitype, convert_to
  from sktime.exceptions import FitFailedWarning
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.utils.parallel import parallelize
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.validation.forecasting import check_cv, check_scoring
label_desc: Use image node_id 3 for calling a global function with example usage: _get_column_order_and_datatype(metric_types, return_data, cutoff_dtype, old_naming) and returns: metrics_metadata