code: def _uniquify_projs(projs, check_active=True, sort=True):
      """Make unique projs."""
      final_projs = []
      for proj in projs:  # flatten
          if not any(
              _proj_equal(p, proj, check_active) for p in final_projs
          ):
              final_projs.append(proj)
  
      my_count = count(len(final_projs))
  
      def sorter(x):
          """Sort in a nice way."""
          digits = [s for s in x["desc"] if s.isdigit()]
          if digits:
              sort_idx = int(digits[-1])
          else:
              sort_idx = next(my_count)
          return (sort_idx, x["desc"])
  
      return sorted(final_projs, key=sorter) if sort else final_projs
  
imports: import re
  from copy import deepcopy
  from itertools import count
  import numpy
  from ..defaults import _BORDER_DEFAULT, _EXTRAPOLATE_DEFAULT, _INTERPOLATION_DEFAULT
  from ..fixes import _safe_svd
  from ..utils import _check_option, _validate_type, fill_doc, logger, object_diff, verbose, warn
  from .constants import FIFF
  from .pick import _ELECTRODE_CH_TYPES, _electrode_types, pick_info, pick_types
  from .tag import _rename_list, find_tag
  from .tree import dir_tree_find
  from .write import _safe_name_list, end_block, start_block, write_float, write_float_matrix, write_int, write_name_list_sanitized, write_string
label_desc: Use image node_id 15 for calling a global function with example usage: _uniquify_projs(projs, check_active, sort) and returns: unknown, sort_idx,  x