code: def get_seasonality_props(
      m,
      fcst,
      df_name="__df__",
      comp_name="weekly",
      multiplicative=False,
      quick=False,
      **kwargs,
  ):
      """
      Prepares a dictionary for plotting the selected seasonality with plotly
  
      Parameters
      ----------
          m : NeuralProphet
              Fitted NeuralProphet model
          fcst : pd.DataFrame
              Output of m.predict
          df_name : str
              ID from time series that should be plotted
          comp_name : str
              Name of the component to plot
          multiplicative : bool
              Flag whetther to plot the y-axis as percentage
          quick : bool
              Use quick low-level call of model
  
      Returns
      -------
          Dictionary with plotly traces, xaxis and yaxis
      """
      # Compute seasonality from Jan 1 through a single period.
      start = pd.to_datetime("2017-01-01 0000")
  
      period = m.config_seasonality.periods[comp_name].period
      if m.data_freq == "B":
          period = 5
          start += pd.Timedelta(days=1)
  
      end = start + pd.Timedelta(days=period)
      if (fcst["ds"].dt.hour == 0).all():  # Day Precision
          plot_points = np.floor(period * 24).astype(int)
      elif (fcst["ds"].dt.minute == 0).all():  # Hour Precision
          plot_points = np.floor(period * 24 * 24).astype(int)
      else:  # Minute Precision
          plot_points = np.floor(period * 24 * 60).astype(int)
      days = pd.to_datetime(
          np.linspace(
              start.value, end.value, plot_points, endpoint=False
          )
      )
      df_y = pd.DataFrame({"ds": days})
      df_y["ID"] = df_name
      if quick:
          predicted = m.predict_season_from_dates(
              m, dates=df_y["ds"], name=comp_name
          )
      else:
          predicted = m.predict_seasonal_components(df_y)[
              ["ds", "ID", comp_name]
          ]
  
      traces = []
      traces.append(
          go.Scatter(
              name="Seasonality: " + comp_name,
              x=df_y["ds"],
              y=predicted[comp_name],
              mode="lines",
              line=go.scatter.Line(
                  color=prediction_color,
                  width=line_width,
                  shape="spline",
                  smoothing=1,
              ),
              showlegend=False,
          )
      )
  
      # Set tick formats (examples are based on 2017-01-06 21:15)
      if period <= 2:
          tickformat = "%H:%M"  # "21:15"
      elif period < 7:
          tickformat = "%A %H:%M"  # "Friday 21:15"
      elif period < 14:
          tickformat = "%A"  # "Friday"
      else:
          tickformat = "%B"  # "January  6"
  
      padded_range = get_dynamic_axis_range(list(df_y["ds"]), type="dt")
      xaxis = go.layout.XAxis(
          title=f"Day of {comp_name[:-2]}"
          if comp_name[-2:] == "ly"
          else f"Day of {comp_name}",
          tickformat=tickformat,
          type="date",
          range=padded_range,
      )
  
      yaxis = go.layout.YAxis(
          title="Seasonality: " + comp_name,
      )
  
      if multiplicative:
          yaxis.update(tickformat=".1%", hoverformat=".4%")
  
      return {"traces": traces, "xaxis": xaxis, "yaxis": yaxis}
  
file_path: neural_prophet/neuralprophet/plot_forecast_plotly.py
imports: import logging
  import numpy
  import pandas
  from neuralprophet.plot_model_parameters_plotly import get_dynamic_axis_range
  from neuralprophet.plot_utils import set_y_as_percent
label_desc: Use image node_id 5 for calling a global function with example usage: get_seasonality_props(m, fcst, df_name, comp_name, multiplicative, quick) and returns: dict