code: def tiny(tmp_path):
      """Create a tiny fake brain."""
      # This is a minimal version of what we need for our viz-with-timeviewer
      # support currently
      subject = "test"
      (tmp_path / subject).mkdir()
      subject_dir = tmp_path / subject
      (subject_dir / "surf").mkdir()
      surf_dir = subject_dir / "surf"
      rng = np.random.RandomState(0)
      rr = rng.randn(4, 3)
      tris = np.array([[0, 1, 2], [2, 1, 3]])
      curv = rng.randn(len(rr))
      with open(surf_dir / "lh.curv", "wb") as fid:
          fid.write(np.array([255, 255, 255], dtype=np.uint8))
          fid.write(np.array([len(rr), 0, 1], dtype=">i4"))
          fid.write(curv.astype(">f4"))
      write_surface(surf_dir / "lh.white", rr, tris)
      write_surface(
          surf_dir / "rh.white", rr, tris
      )  # needed for vertex tc
      vertices = [np.arange(len(rr)), []]
      data = rng.randn(len(rr), 10)
      stc = SourceEstimate(data, vertices, 0, 1, subject)
      brain = stc.plot(
          subjects_dir=tmp_path,
          hemi="lh",
          surface="white",
          size=_TINY_SIZE,
      )
      # in principle this should be sufficient:
      #
      # ratio = brain.mpl_canvas.canvas.window().devicePixelRatio()
      #
      # but in practice VTK can mess up sizes, so let's just calculate it.
      sz = brain.plotter.size()
      sz = (sz.width(), sz.height())
      sz_ren = brain.plotter.renderer.GetSize()
      ratio = np.round(
          np.median(np.array(sz_ren) / np.array(sz))
      ).astype(int)
      return brain, ratio
  
imports: import os
  import platform
  from pathlib import Path
  from shutil import copyfile
  import numpy
  import pytest
  from matplotlib import image
  from matplotlib.lines import Line2D
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import Dipole, MixedSourceEstimate, SourceEstimate, VolSourceEstimate, create_info, pick_types_forward, read_cov, read_evokeds, read_forward_solution, read_source_estimate, vertex_to_mni, write_surface
  from mne.channels import make_dig_montage
  from mne.datasets import testing
  from mne.io import read_info
  from mne.label import read_label
  from mne.minimum_norm import apply_inverse, make_inverse_operator
  from mne.source_estimate import _BaseSourceEstimate
  from mne.source_space import read_source_spaces, setup_volume_source_space
  from mne.utils import check_version
  from mne.viz import ui_events
  from mne.viz._brain import Brain, _BrainScraper, _LayeredMesh, _LinkViewer
  from mne.viz._brain.colormap import calculate_lut
  from mne.viz.utils import _get_cmap
label_desc: Use image node_id 11 for calling a global function with example usage: tiny(tmp_path) and returns: brain,  ratio