code: def _acompcor_mask(
      confounds_json, anat_mask, compcor_cols_filt, n_compcor
  ):
      """Filter according to acompcor mask(s) and select top components.
  
      Parameters
      ----------
      confounds_json : :obj: `dict`
          Dictionary of confounds from the confounds.json file.
      anat_mask : :obj:`list`
          List of anatomical masks to use for acompcor.
      compcor_cols_filt : :obj:`list`
          List of compcor components column names filtered by user
          selected CompCor strategy.
      n_compcor : :obj:`int` or :obj:`str`
          Number of compcor components to retain. If "all", all components
          are retained.
  
      Returns
      -------
      collector : :obj:`list`
          List of compcor components column names to retain.
      """
      collector = []
      for mask in anat_mask:
          cols = _json_mask(compcor_cols_filt, confounds_json, mask)
          cols = _select_compcor(cols, n_compcor)
          collector += cols
      return collector
  
label_desc: Use image node_id 4 for calling a global function with example usage: _acompcor_mask(confounds_json, anat_mask, compcor_cols_filt, n_compcor) and returns: collector