code: def _predict(
      self, df: pd.DataFrame
  ) -> Union[pd.Series, pd.DataFrame]:
      if isinstance(df, pd.DataFrame):
          if df.columns.duplicated().any():
              raise ValueError(
                  "Input DataFrame must have unique column names."
              )
          df_copy = df.copy()
          predicted = self._predict_core(df_copy)
      else:
          raise TypeError("Input must be a pandas DataFrame.")
      # make sure index freq is the same (because pandas has a bug that some
      # operation, e.g. concat, may change freq)
      predicted.index.freq = df.index.freq
      return predicted
  
imports: from abc import ABC, abstractmethod
  from copy import deepcopy
  from typing import Any, Dict, List, Tuple, Union
  import pandas
label_desc: Use image node_id 1 for calling the _NonTrainableMultivariateModel obj's underlying member method code with example usage: obj._predict(df) and returns: predicted