code: def test_manual_report_3d(tmp_path, renderer):
      """Simulate adding 3D sections."""
      pytest.importorskip("nibabel")
      r = Report(title="My Report")
      info = read_info(raw_fname)
      with info._unlock():
          dig, info["dig"] = info["dig"], []
      add_kwargs = dict(
          trans=trans_fname,
          info=info,
          subject="sample",
          subjects_dir=subjects_dir,
      )
      with pytest.warns(
          RuntimeWarning, match="could not be calculated"
      ):
          r.add_trans(title="coreg no dig", **add_kwargs)
      with info._unlock():
          info["dig"] = dig
      # TODO: We should probably speed this up. We could expose an arg to allow
      # use of sparse rather than dense head, and also possibly an arg to specify
      # which views to actually show. Both of these could probably be useful to
      # end-users, too.
      r.add_trans(title="my coreg", **add_kwargs)
      r.add_bem(
          subject="sample",
          subjects_dir=subjects_dir,
          title="my bem",
          decim=100,
      )
      r.add_inverse_operator(
          inverse_operator=inv_fname,
          title="my inverse",
          subject="sample",
          subjects_dir=subjects_dir,
          trans=trans_fname,
      )
      r.add_stc(
          stc=stc_fname,
          title="my stc",
          subject="sample",
          subjects_dir=subjects_dir,
          n_time_points=2,
          stc_plot_kwargs=stc_plot_kwargs,
      )
      fname = tmp_path / "report.html"
      r.save(fname=fname, open_browser=False)
  
imports: import base64
  import copy
  import glob
  import os
  import pickle
  import re
  import shutil
  from io import BytesIO
  from pathlib import Path
  import numpy
  import pytest
  from matplotlib import pyplot
  from mne import Epochs, create_info, pick_channels_cov, read_cov, read_events, read_evokeds
  from mne._fiff.write import DATE_NONE
  from mne.datasets import testing
  from mne.epochs import make_metadata
  from mne.io import RawArray, read_info, read_raw_fif
  from mne.preprocessing import ICA
  from mne.report import Report, _ReportScraper, open_report, report
  from mne.report import report
  from mne.report.report import _ALLOWED_IMAGE_FORMATS, CONTENT_ORDER, _webp_supported
  from mne.utils import Bunch
  from mne.utils._testing import assert_object_equal
  from mne.viz import plot_alignment
label_desc: Use image node_id 25 for calling a global function with example usage: test_manual_report_3d(tmp_path, renderer) without return types