code: def plot_forecast(
      data: [InputData, MultiModalData],
      prediction: OutputData,
      in_sample: bool = False,
      target: Optional[Any] = None,
      title: str = "Forecast",
      save_path: Optional[Union[PathLike, str]] = None,
  ):
      """
      Function for drawing plot with time series forecast. If data.target is None function plot prediction
      as future values. If not - we use last data features as validation.
  
      Args:
          data: the InputData or MultiModalData with actual time series as features
          prediction: the OutputData with predictions
          in_sample: if obtained prediction was in sample.
          save_path: path to save the visualized forecast
          title: custom title for the plot
          If ``False`` plots predictions as future values for test data features.
          target: user-specified name of target variable for MultiModalData
      """
      if isinstance(data, MultiModalData):
          if not target:
              raise AttributeError(
                  "Can't visualize. Target of MultiModalData not set."
              )
          data = data.extract_data_source(target)
      if data.data_type == DataTypesEnum.multi_ts:
          actual_time_series = data.features[:, 0]
      else:
          actual_time_series = data.features
      target_time_series = data.target
      predict = prediction.predict
      pred_start = len(actual_time_series)
      if in_sample:
          pred_start = len(actual_time_series) - len(predict)
      elif target_time_series is not None:
          actual_time_series = np.concatenate(
              [actual_time_series, target_time_series], axis=0
          )
  
      padding = min(pred_start, 72)
  
      first_idx = pred_start - padding
  
      plt.plot(
          np.arange(pred_start, pred_start + len(predict)),
          predict,
          label="Predicted",
          c="blue",
      )
      plt.plot(
          np.arange(first_idx, len(actual_time_series)),
          actual_time_series[first_idx:],
          label="Actual values",
          c="green",
      )
  
      # Plot black line which divide our array into train and test
      plt.plot(
          [pred_start, pred_start],
          [
              min(actual_time_series[first_idx:]),
              max(actual_time_series[first_idx:]),
          ],
          c="black",
          linewidth=1,
      )
  
      if in_sample:
          in_sample_steps = np.arange(
              pred_start,
              pred_start + len(predict),
              data.task.task_params.forecast_length,
          )[1:]
          plt.vlines(
              in_sample_steps,
              ymin=min(actual_time_series[first_idx:]),
              ymax=max(actual_time_series[first_idx:]),
              color="red",
              linewidth=1,
          )
      plt.legend(fontsize=15)
      plt.title(title)
      plt.grid()
  
      if save_path:
          plt.savefig(save_path)
          plt.close()
      else:
          plt.show()
  
file_path: FEDOT/fedot/core/data/visualisation.py
imports: from os import PathLike
  from typing import Optional, Any, Union
  import matplotlib.pyplot
  import numpy
  from fedot.core.composer.metrics import ROCAUC
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.repository.dataset_types import DataTypesEnum
label_desc: Use image node_id 1 for calling a global function with example usage: plot_forecast(data, prediction, in_sample, target, title, save_path) without return types