code: def _vertices_for_get_psf_ctf(idx, src):
      """Get vertices in source space for PSFs/CTFs in _get_psf_ctf()."""
      # idx must be list
      # if label(s) specified get the indices, otherwise just carry on
      if type(idx[0]) is Label:
          # specify without source time courses, gets indices per label
          verts_labs, _ = _prepare_label_extraction(
              stc=None,
              labels=idx,
              src=src,
              mode="mean",
              allow_empty=False,
              use_sparse=False,
          )
          # verts_labs can be list of lists
          # concatenate indices per label across hemispheres
          # one list item per label
          verts = []
  
          for v in verts_labs:
              # if two hemispheres present
              if isinstance(v, list):
                  # indices for both hemispheres in one list
                  this_verts = np.concatenate((v[0], v[1]))
              else:
                  this_verts = np.array(v)
              verts.append(this_verts)
      # check if list of list or just list
      else:
          if isinstance(idx[0], list):  # if list of list of integers
              verts = idx
          else:  # if list of integers
              verts = [idx]
  
      return verts
  
imports: from copy import deepcopy
  import numpy
  from mne.minimum_norm.inverse import InverseOperator
  from .._fiff.constants import FIFF
  from .._fiff.pick import pick_channels_forward
  from ..evoked import EvokedArray
  from ..forward.forward import Forward, convert_forward_solution
  from ..label import Label
  from ..source_estimate import _get_src_type, _make_stc, _prepare_label_extraction
  from ..source_space._source_space import SourceSpaces, _get_vertno
  from ..utils import _validate_type, logger, verbose
  from .inverse import apply_inverse
label_desc: Use image node_id 4 for calling a global function with example usage: _vertices_for_get_psf_ctf(idx, src) and returns: verts