class_docstr: Abstract class for surface figures.
  
  Parameters
  ----------
  figure : Figure instance or ``None``, optional
      Figure to be wrapped.
  
  output_file : :obj:`str` or ``None``, optional
      Path to output file.
docstr: If an output file is provided,         set it as the new default output file.
  
  Parameters
  ----------
  output_file : :obj:`str` or ``None``, optional
      Path to output file.
docstr_tok: ["If","an","output","file","is","provided",",","set","it","as","the","new","default","output","file",".","Parameters","--","--","--","--","--","output_file",":",":","obj",":","`","str","`","or","``","None","``",",","optional","Path","to","output","file","."]
code: def _check_output_file(self, output_file=None):
      """If an output file is provided, \
          set it as the new default output file.
  
          Parameters
          ----------
          output_file : :obj:`str` or ``None``, optional
              Path to output file.
          """
      if output_file is None:
          if self.output_file is None:
              raise ValueError(
                  "You must provide an output file "
                  "name to save the figure."
              )
      else:
          self.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 3 for calling the SurfaceFigure obj's underlying member method code with example usage: obj._check_output_file(output_file) without return types