code: def circular_layout(
      node_names,
      node_order,
      start_pos=90,
      start_between=True,
      group_boundaries=None,
      group_sep=10,
  ):
      """Create layout arranging nodes on a circle.
  
      Parameters
      ----------
      node_names : list of str
          Node names.
      node_order : list of str
          List with node names defining the order in which the nodes are
          arranged. Must have the elements as node_names but the order can be
          different. The nodes are arranged clockwise starting at "start_pos"
          degrees.
      start_pos : float
          Angle in degrees that defines where the first node is plotted.
      start_between : bool
          If True, the layout starts with the position between the nodes. This is
          the same as adding "180. / len(node_names)" to start_pos.
      group_boundaries : None | array-like
          List of of boundaries between groups at which point a "group_sep" will
          be inserted. E.g. "[0, len(node_names) / 2]" will create two groups.
      group_sep : float
          Group separation angle in degrees. See "group_boundaries".
  
      Returns
      -------
      node_angles : array, shape=(n_node_names,)
          Node angles in degrees.
      """
      n_nodes = len(node_names)
  
      if len(node_order) != n_nodes:
          raise ValueError(
              "node_order has to be the same length as node_names"
          )
  
      if group_boundaries is not None:
          boundaries = np.array(group_boundaries, dtype=np.int64)
          if np.any(boundaries >= n_nodes) or np.any(boundaries < 0):
              raise ValueError(
                  '"group_boundaries" has to be between 0 and '
                  "n_nodes - 1."
              )
          if len(boundaries) > 1 and np.any(np.diff(boundaries) <= 0):
              raise ValueError(
                  '"group_boundaries" must have non-decreasing '
                  "values."
              )
          n_group_sep = len(group_boundaries)
      else:
          n_group_sep = 0
          boundaries = None
  
      # convert it to a list with indices
      node_order = [node_order.index(name) for name in node_names]
      node_order = np.array(node_order)
      if len(np.unique(node_order)) != n_nodes:
          raise ValueError("node_order has repeated entries")
  
      node_sep = (360.0 - n_group_sep * group_sep) / n_nodes
  
      if start_between:
          start_pos += node_sep / 2
  
          if boundaries is not None and boundaries[0] == 0:
              # special case when a group separator is at the start
              start_pos += group_sep / 2
              boundaries = boundaries[1:] if n_group_sep > 1 else None
  
      node_angles = np.ones(n_nodes, dtype=np.float64) * node_sep
      node_angles[0] = start_pos
      if boundaries is not None:
          node_angles[boundaries] += group_sep
  
      node_angles = np.cumsum(node_angles)[node_order]
  
      return node_angles
  
file_path: mne-python/mne/viz/circle.py
imports: from functools import partial
  from itertools import cycle
  import numpy
  from ..utils import _validate_type
  from .utils import _get_cmap, plt_show
label_desc: Use image node_id 1 for calling a global function with example usage: circular_layout(node_names, node_order, start_pos, start_between, group_boundaries, group_sep) and returns: node_angles