code: def _get_camera_view_from_elevation_and_azimut(view):
      """Compute plotly camera parameters from elevation and azimut."""
      elev, azim = view
      # The radius is useful only when using a "perspective" projection,
      # otherwise, if projection is "orthographic",
      # one should tweak the "aspectratio" to emulate zoom
      r = 1.5
      # The camera position and orientation is set by three 3d vectors,
      # whose coordinates are independent of the plotted data.
      return {
          # Where the camera should look at
          # (it should always be looking at the center of the scene)
          "center": {"x": 0, "y": 0, "z": 0},
          # Where the camera should be located
          "eye": {
              "x": (
                  r
                  * math.cos(azim / 360 * 2 * math.pi)
                  * math.cos(elev / 360 * 2 * math.pi)
              ),
              "y": (
                  r
                  * math.sin(azim / 360 * 2 * math.pi)
                  * math.cos(elev / 360 * 2 * math.pi)
              ),
              "z": r * math.sin(elev / 360 * 2 * math.pi),
          },
          # How the camera should be rotated.
          # It is determined by a 3d vector indicating which direction
          # should look up in the generated plot
          "up": {
              "x": math.sin(elev / 360 * 2 * math.pi)
              * math.cos(azim / 360 * 2 * math.pi + math.pi),
              "y": math.sin(elev / 360 * 2 * math.pi)
              * math.sin(azim / 360 * 2 * math.pi + math.pi),
              "z": math.cos(elev / 360 * 2 * math.pi),
          },
          # "projection": {"type": "perspective"},
          "projection": {"type": "orthographic"},
      }
  
imports: import itertools
  import math
  from collections.abc import Sequence
  from warnings import warn
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import gridspec
  from matplotlib.cm import ScalarMappable
  from matplotlib.colorbar import make_axes
  from matplotlib.colors import LinearSegmentedColormap, Normalize, to_rgba
  from matplotlib.patches import Patch
  from mpl_toolkits.mplot3d.art3d import Poly3DCollection
  from nilearn import image, surface
  from nilearn._utils import check_niimg_3d, compare_version, fill_doc
  from nilearn._utils.helpers import is_kaleido_installed, is_plotly_installed
  from nilearn.plotting.cm import cold_hot, mix_colormaps
  from nilearn.plotting.displays._slicers import _get_cbar_ticks
  from nilearn.plotting.html_surface import get_vertexcolor
  from nilearn.plotting.img_plotting import get_colorbar_and_data_ranges
  from nilearn.plotting.js_plotting_utils import colorscale
  from nilearn.surface import load_surf_data, load_surf_mesh, vol_to_surf
  from nilearn.surface.surface import check_mesh
label_desc: Use image node_id 2 for calling a global function with example usage: _get_camera_view_from_elevation_and_azimut(view) and returns: dict