code: def _get_data_types_to_plot(
      plot: str,
      data_types_requested: Optional[Union[str, List[str]]] = None,
  ) -> List[str]:
      """Returns the data types to plot based on the requested ones. If all are allowed
      for the requested plot, they are returned as is, else this function will trim them
      down to the allowed types only.
  
      NOTE: Some plots only support one data type. If multiple data types are requested
      for such plots, only the first one is used (appropriate warning issued).
  
      Parameters
      ----------
      plot : str
          The plot for which the data types are being requested
      data_types_requested : Optional[Union[str, List[str]]], optional
          The data types being requested for the plot, by default None
          If None, it picks the default from the internal list.
  
      Returns
      -------
      List[str]
          The allowed data types for the requested plot based on user inputs
  
      Raises
      ------
      ValueError
          If none of the requested data types are supported by the plot
      """
  
      # Get default if not provided ----
      if data_types_requested is None:
          # First one is the default
          data_types_requested = [ALLOWED_PLOT_DATA_TYPES.get(plot)[0]]
  
      # Convert string to list ----
      if isinstance(data_types_requested, str):
          data_types_requested = [data_types_requested]
  
      # Is the data type allowed for the requested plot?
      all_plot_data_types = [
          member.value for member in TSAllowedPlotDataTypes
      ]
      data_types_allowed = [
          True
          if data_type_requested in ALLOWED_PLOT_DATA_TYPES.get(plot)
          and data_type_requested in all_plot_data_types
          else False
          for data_type_requested in data_types_requested
      ]
  
      # Clean up list based on allowed data types
      cleaned_data_types = []
      for requested, allowed in zip(
          data_types_requested, data_types_allowed
      ):
          if allowed:
              cleaned_data_types.append(requested)
          else:
              msg = (
                  f"Data Type: '{requested}' is not supported for plot: '{plot}'. "
                  "This will be ignored."
              )
              logger.warning(msg)
              print(msg)
  
      if len(cleaned_data_types) == 0:
          raise ValueError(
              "No data to plot. Please check to make sure that you have requested "
              "an allowed data type for plot."
              f"\n Allowed values are: {ALLOWED_PLOT_DATA_TYPES.get(plot)}"
          )
  
      if (
          not MULTIPLE_PLOT_TYPES_ALLOWED_AT_ONCE.get(plot)
          and len(cleaned_data_types) > 1
      ):
          msg = (
              f"Data Type requested for plot '{plot}' = {cleaned_data_types}, "
              "but this plot only supports a single data type at a time. "
              f"\nThe first one (i.e. '{cleaned_data_types[0]}') will be used."
          )
          logger.warning(msg)
          print(msg)
          cleaned_data_types = [cleaned_data_types[0]]
  
      return cleaned_data_types
  
imports: from math import ceil
  from typing import Any, Dict, List, Optional, Tuple, Union
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  import plotly.io
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from plotly.subplots import make_subplots
  from scipy.fft import fft, fftfreq
  from scipy.signal import periodogram
  from statsmodels.graphics.gofplots import qqplot
  from statsmodels.tsa.seasonal import STL, seasonal_decompose
  from statsmodels.tsa.stattools import acf, ccf, pacf
  from pycaret.internal.logging import get_logger
  from pycaret.utils.generic import _resolve_dict_keys
  from pycaret.utils.time_series import TSAllowedPlotDataTypes
label_desc: Use image node_id 17 for calling a global function with example usage: _get_data_types_to_plot(plot, data_types_requested) and returns: cleaned_data_types