code: def decode_domains(X_enc, y_enc):
      """Decode the domains of the matrices in the labels.
  
      We handle the possibility of having different domains for the datasets by
      encoding the domain information into the labels of the matrices. This
      method converts the data into its original form, with a separate data
      structure for labels and for domains.
  
      Parameters
      ----------
      X_enc : ndarray, shape (n_matrices, n_channels, n_channels)
          Set of SPD matrices.
      y_enc : ndarray, shape (n_matrices,)
          Extended labels for each matrix.
  
      Returns
      -------
      X : ndarray, shape (n_matrices, n_channels, n_channels)
          Set of SPD matrices.
      y : ndarray, shape (n_matrices,)
          Labels for each matrix.
      domain : ndarray, shape (n_matrices,)
          Domains for each matrix.
  
      See Also
      --------
      encode_domains
  
      Notes
      -----
      .. versionadded:: 0.4
      """
      y, domain = [], []
      for y_enc_ in y_enc:
          y_dec_ = y_enc_.split("/")
          domain.append(y_dec_[-2])
          y.append(y_dec_[-1])
      return X_enc, np.array(y), np.array(domain)
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: decode_domains(X_enc, y_enc) and returns: X_enc,  np,  np