code: def read_ch_adjacency(fname, picks=None):
      """Read a channel adjacency ("neighbors") file that ships with MNE.
  
      More information on these neighbor definitions can be found on the related
      `FieldTrip documentation pages
      <http://www.fieldtriptoolbox.org/template/neighbours/>`__.
  
      Parameters
      ----------
      fname : path-like | str
          The path to the file to load, or the name of a channel adjacency
          matrix that ships with MNE-Python.
  
          .. note::
              You can retrieve the names of all
              built-in channel adjacencies via
              :func:`mne.channels.get_builtin_ch_adjacencies`.
      %(picks_all_notypes)s
  
      Returns
      -------
      ch_adjacency : scipy.sparse.csr_matrix, shape (n_channels, n_channels)
          The adjacency matrix.
      ch_names : list
          The list of channel names present in adjacency matrix.
  
      See Also
      --------
      get_builtin_ch_adjacencies
      mne.viz.plot_ch_adjacency
      find_ch_adjacency
      mne.stats.combine_adjacency
  
      Notes
      -----
      If the neighbor definition you need is not shipped by MNE-Python,
      you may use :func:`find_ch_adjacency` to compute the
      adjacency matrix based on your 2D sensor locations.
  
      Note that depending on your use case, you may need to additionally use
      :func:`mne.stats.combine_adjacency` to prepare a final "adjacency"
      to pass to the eventual function.
      """
      if op.isabs(fname):
          fname = str(
              _check_fname(
                  fname=fname,
                  overwrite="read",
                  must_exist=True,
              )
          )
      else:  # built-in FieldTrip neighbors
          ch_adj_name = fname
          del fname
          if ch_adj_name.endswith("_neighb.mat"):  # backward-compat
              ch_adj_name = ch_adj_name.replace("_neighb.mat", "")
  
          if ch_adj_name not in get_builtin_ch_adjacencies():
              raise ValueError(
                  f"No built-in channel adjacency matrix found with name: "
                  f"{ch_adj_name}. Valid names are: "
                  f'{", ".join(get_builtin_ch_adjacencies())}'
              )
  
          ch_adj = [
              a
              for a in _BUILTIN_CHANNEL_ADJACENCIES
              if a.name == ch_adj_name
          ][0]
          fname = ch_adj.fname
          templates_dir = (
              Path(__file__).resolve().parent / "data" / "neighbors"
          )
          fname = str(
              _check_fname(  # only needed to convert to a string
                  fname=templates_dir / fname,
                  overwrite="read",
                  must_exist=True,
              )
          )
  
      nb = loadmat(fname)["neighbours"]
      ch_names = _recursive_flatten(nb["label"], str)
      temp_info = create_info(ch_names, 1.0)
      picks = _picks_to_idx(temp_info, picks, none="all")
      neighbors = [
          _recursive_flatten(c, str)
          for c in nb["neighblabel"].flatten()
      ]
      assert len(ch_names) == len(neighbors)
      adjacency = _ch_neighbor_adjacency(ch_names, neighbors)
      # picking before constructing matrix is buggy
      adjacency = adjacency[picks][:, picks]
      ch_names = [ch_names[p] for p in picks]
  
      return adjacency, ch_names
  
imports: import os.path
  import string
  import sys
  from collections import OrderedDict
  from copy import deepcopy
  from dataclasses import dataclass
  from functools import partial
  from pathlib import Path
  from typing import Union
  import numpy
  from scipy.io import loadmat
  from scipy.sparse import csr_matrix, lil_matrix
  from scipy.spatial import Delaunay
  from scipy.stats import zscore
  from .._fiff.constants import FIFF
  from .._fiff.meas_info import Info, MontageMixin, _merge_info, _rename_comps, _unit2human, create_info
  from .._fiff.pick import _check_excludes_includes, _pick_data_channels, _picks_by_type, _picks_to_idx, _second_rules, channel_indices_by_type, channel_type, pick_channels, pick_info, pick_types
  from .._fiff.proj import setup_proj
  from .._fiff.reference import add_reference_channels, set_eeg_reference
  from .._fiff.tag import _rename_list
  from ..bem import _check_origin
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..utils import _check_dict_keys, _check_fname, _check_option, _check_preload, _get_stim_channel, _on_missing, _validate_type, fill_doc, legacy, logger, verbose, warn
label_desc: Use image node_id 7 for calling a global function with example usage: read_ch_adjacency(fname, picks) and returns: adjacency,  ch_names