class_docstr: Implementation of a surface figure obtained with `plotly` engine.
  
  Parameters
  ----------
  figure : Plotly figure instance or ``None``, optional
      Plotly figure instance to be used.
  
  output_file : :obj:`str` or ``None``, optional
      Output file path.
  
  Attributes
  ----------
  figure : Plotly figure instance
      Plotly figure. Use this attribute to access the underlying
      plotly figure for further customization and use plotly
      functionality.
  
  output_file : :obj:`str`
      Output file path.
code: def __init__(self, figure=None, output_file=None):
      if not is_plotly_installed():
          raise ImportError(
              "Plotly is required to use `PlotlySurfaceFigure`."
          )
      import plotly.graph_objects as go
  
      if figure is not None and not isinstance(figure, go.Figure):
          raise TypeError(
              "`PlotlySurfaceFigure` accepts only plotly figure objects."
          )
      super().__init__(figure=figure, output_file=output_file)
  
file_path: nilearn/nilearn/plotting/displays/_figures.py
imports: from nilearn._utils.helpers import is_kaleido_installed, is_plotly_installed
label_desc: Use image node_id 1 to create a new PlotlySurfaceFigure object from inherited base classes: SurfaceFigure with example: obj = PlotlySurfaceFigure(figure, output_file)