code: def make_eeg_layout(
      info,
      radius=0.5,
      width=None,
      height=None,
      exclude="bads",
      csd=False,
  ):
      """Create .lout file from EEG electrode digitization.
  
      Parameters
      ----------
      %(info_not_none)s
      radius : float
          Viewport radius as a fraction of main figure height. Defaults to 0.5.
      width : float | None
          Width of sensor axes as a fraction of main figure height. By default,
          this will be the maximum width possible without axes overlapping.
      height : float | None
          Height of sensor axes as a fraction of main figure height. By default,
          this will be the maximum height possible without axes overlapping.
      exclude : list of str | str
          List of channels to exclude. If empty do not exclude any.
          If 'bads', exclude channels in info['bads'] (default).
      csd : bool
          Whether the channels contain current-source-density-transformed data.
  
      Returns
      -------
      layout : Layout
          The generated Layout.
  
      See Also
      --------
      make_grid_layout, generate_2d_layout
      """
      if not (0 <= radius <= 0.5):
          raise ValueError(
              "The radius parameter should be between 0 and 0.5."
          )
      if width is not None and not (0 <= width <= 1.0):
          raise ValueError(
              "The width parameter should be between 0 and 1."
          )
      if height is not None and not (0 <= height <= 1.0):
          raise ValueError(
              "The height parameter should be between 0 and 1."
          )
  
      pick_kwargs = dict(
          meg=False, eeg=True, ref_meg=False, exclude=exclude
      )
      if csd:
          pick_kwargs.update(csd=True, eeg=False)
      picks = pick_types(info, **pick_kwargs)
      loc2d = _find_topomap_coords(info, picks)
      names = [info["chs"][i]["ch_name"] for i in picks]
  
      # Scale [x, y] to be in the range [-0.5, 0.5]
      # Don't mess with the origin or aspect ratio
      scale = (
          np.maximum(
              -np.min(loc2d, axis=0), np.max(loc2d, axis=0)
          ).max()
          * 2
      )
      loc2d /= scale
  
      # If no width or height specified, calculate the maximum value possible
      # without axes overlapping.
      if width is None or height is None:
          width, height = _box_size(loc2d, width, height, padding=0.1)
  
      # Scale to viewport radius
      loc2d *= 2 * radius
  
      # Some subplot centers will be at the figure edge. Shrink everything so it
      # fits in the figure.
      scaling = min(1 / (1.0 + width), 1 / (1.0 + height))
      loc2d *= scaling
      width *= scaling
      height *= scaling
  
      # Shift to center
      loc2d += 0.5
  
      n_channels = loc2d.shape[0]
      pos = np.c_[
          loc2d[:, 0] - 0.5 * width,
          loc2d[:, 1] - 0.5 * height,
          width * np.ones(n_channels),
          height * np.ones(n_channels),
      ]
  
      box = (0, 1, 0, 1)
      ids = 1 + np.arange(n_channels)
      layout = Layout(
          box=box, pos=pos, names=names, kind="EEG", ids=ids
      )
      return layout
  
imports: import logging
  from collections import defaultdict
  from itertools import combinations
  from pathlib import Path
  import numpy
  from scipy.spatial.distance import pdist, squareform
  from .._fiff.constants import FIFF
  from .._fiff.meas_info import Info
  from .._fiff.pick import _FNIRS_CH_TYPES_SPLIT, _picks_to_idx, pick_types
  from ..transforms import _cart_to_sph, _pol_to_cart
  from ..utils import _check_ch_locs, _check_fname, _check_option, _check_sphere, _clean_names, fill_doc, logger, warn
  from ..viz.topomap import plot_layout
  from .channels import _get_ch_info
label_desc: Use image node_id 4 for calling a global function with example usage: make_eeg_layout(info, radius, width, height, exclude, csd) and returns: layout