docstr: Return the predictions
  # TODO: Check if the series can be converted to a dataframe for all models.
  :rtype cam be Pandas Series (simple), pandas dataframe (simple = False) or None
docstr_tok: ["Return","the","predictions","#","TODO",":","Check","if","the","series","can","be","converted","to","a","dataframe","for","all","models",".",":","rtype","cam","be","Pandas","Series","(","simple",")",",","pandas","dataframe","(","simple","=","False",")","or","None"]
code: def predict(
      self,
      testdata: Optional[pd.DataFrame] = None,
      forecast_period: Optional[int] = None,
      simple: bool = True,
  ) -> NDFrame:
      """
      Return the predictions
      # TODO: Check if the series can be converted to a dataframe for all models.
      :rtype cam be Pandas Series (simple), pandas dataframe (simple = False) or None
      """
  
      # TODO: Add processing of 'simple' argument and return type
  
      if testdata is not None:
          warnings.warn(
              "You have passed exogenous variables to make predictions for a ARIMA model."
              + "ARIMA models are univariate models and hence these exogenous variables will be ignored for these predictions."
          )
  
      # TODO: Predictions coming from ARIMA include extra information compared to SARIMAX and VAR.
      # Need to make it consistent
      # Extract the dynamic predicted and true values of our time series
      if forecast_period is None:
          # use the forecast period used during training
          forecast_period = self.forecast_period
  
      y_forecasted = self.model.forecast(forecast_period)
  
      # TODO: Check if the datetime index can be obtained as in the case of SARIMAX.
      # Currently it is just a text index, e.g. Forecast_1, ...
      if simple:
          res_frame = pd.DataFrame(
              [
                  y_forecasted[0],  # Mean Forecast
              ],
              index=["mean"],
              columns=[
                  "Forecast_" + str(x)
                  for x in range(1, forecast_period + 1)
              ],
          ).T
          res_frame = (
              res_frame.squeeze()
          )  # Convert to a pandas series object
      else:
          res_frame = pd.DataFrame(
              [
                  y_forecasted[0],  # Mean Forecast
                  y_forecasted[1],  # Std Error
                  y_forecasted[2],  # Lower and Upper CI
              ],
              index=["mean", "mean_se", "mean_ci"],
              columns=[
                  "Forecast_" + str(x)
                  for x in range(1, forecast_period + 1)
              ],
          ).T
  
          res_frame["mean_ci_lower"] = res_frame["mean_ci"].map(
              lambda x: x[0]
          )
          res_frame["mean_ci_upper"] = res_frame["mean_ci"].map(
              lambda x: x[1]
          )
          res_frame.drop("mean_ci", axis=1, inplace=True)
  
      return res_frame
  
file_path: Auto_TS/auto_ts/models/ar_based/build_arima.py
imports: from typing import Optional
  import warnings
  import itertools
  import operator
  import copy
  import numpy
  import pandas
  from pandas.core.generic import NDFrame
  import matplotlib.pyplot
  import seaborn
  from statsmodels.tsa.arima_model import ARIMA
  from ...utils import print_static_rmse, print_dynamic_rmse
  from ...models.ar_based.param_finder import find_lowest_pq
  import pdb
label_desc: Use image node_id 3 for calling the BuildArima obj's underlying member method code with example usage: obj.predict(testdata, forecast_period, simple) and returns: res_frame