code: def get_multiforecast_component_props(
      fcst,
      comp_name,
      plot_name=None,
      multiplicative=False,
      bar=False,
      focus=1,
      num_overplot=None,
      **kwargs,
  ):
      """
      Prepares a dictionary for plotting the selected multi forecast component with plotly
  
      Parameters
      ----------
          fcst : pd.DataFrame
              Output of m.predict
          comp_name : str
              Name of the component to plot
          plot_name : str
              Name of the plot
          multiplicative : bool
              Flag whetther to plot the y-axis as percentage
          bar : bool
              Flag whether to plot the component as a bar
          focus : int
              Id of the forecast to display
          add_x : bool
              Flag whether to add x-symbols to the plotted points
  
      Returns
      -------
          Dictionary with plotly traces, xaxis and yaxis
      """
      if plot_name is None:
          plot_name = comp_name
  
      # Remove empty rows for the respective components
      if num_overplot:
          fcst = fcst.loc[
              (fcst[f"{comp_name}1"].notna())
              | (fcst[f"{comp_name}{num_overplot}"].notna())
          ]
      else:
          fcst = fcst.loc[fcst[comp_name].notna()]
  
      text = None
      mode = "lines"
      fcst_t = fcst["ds"].dt.to_pydatetime()
      col_names = [
          col_name
          for col_name in fcst.columns
          if col_name.startswith(comp_name)
      ]
      traces = []
  
      if num_overplot is not None:
          assert num_overplot <= len(col_names)
          for i in list(range(num_overplot))[::-1]:
              y = fcst[f"{comp_name}{i+1}"]
              y = y.values
              alpha_min = 0.2
              alpha_softness = 1.2
              alpha = alpha_min + alpha_softness * (1.0 - alpha_min) / (
                  i + 1.0 * alpha_softness
              )
              y[-1] = 0
  
              if bar:
                  traces.append(
                      go.Bar(
                          name=plot_name,
                          x=fcst_t,
                          y=y,
                          text=text,
                          marker_color=prediction_color,
                          opacity=alpha,
                          showlegend=False,
                      )
                  )
  
              else:
                  traces.append(
                      go.Scatter(
                          name=plot_name,
                          x=fcst_t,
                          y=y,
                          mode=mode,
                          line=go.scatter.Line(
                              color=prediction_color, width=line_width
                          ),
                          text=text,
                          opacity=alpha,
                          showlegend=False,
                      )
                  )
  
      if num_overplot is None or focus > 1:
          y = fcst[f"{comp_name}"]
          y = y.values
          y[-1] = 0
          if bar:
              traces.append(
                  go.Bar(
                      name=plot_name,
                      x=fcst_t,
                      y=y,
                      text=text,
                      marker_color=prediction_color,
                      showlegend=False,
                  )
              )
          else:
              traces.append(
                  go.Scatter(
                      name=plot_name,
                      x=fcst_t,
                      y=y,
                      mode=mode,
                      line=go.scatter.Line(
                          color=prediction_color, width=line_width
                      ),
                      text=text,
                      showlegend=False,
                  )
              )
  
      padded_range = get_dynamic_axis_range(list(fcst["ds"]), type="dt")
      xaxis = go.layout.XAxis(
          title="ds", type="date", range=padded_range
      )
      yaxis = go.layout.YAxis(
          rangemode="normal" if comp_name == "trend" else "tozero",
          title=plot_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 4 for calling a global function with example usage: get_multiforecast_component_props(fcst, comp_name, plot_name, multiplicative, bar, focus, num_overplot) and returns: dict