code: def get_combination_wise_output_matrix(y, order):
      """Returns label combinations of a given order that are assigned to each row
  
      Parameters:
      -----------
      y : output matrix or array of arrays (n_samples, n_labels)
          the binary-indicator label assignment per sample representation of the output space
  
      order : int, >= 1
          the order of label relationship to take into account when balancing sample distribution across labels
  
      Returns
      -------
      combinations_per_row : List[Set[Tuple[int]]]
          list of combination assignments per row
      """
      return np.array(
          [
              set(
                  tuple(combination)
                  for combination in it.combinations_with_replacement(
                      get_indicator_representation(row), order
                  )
              )
              for row in y
          ]
      )
  
file_path: scikit-multilearn/skmultilearn/model_selection/measures.py
imports: import numpy
  import itertools
label_desc: Use image node_id 3 for calling a global function with example usage: get_combination_wise_output_matrix(y, order) and returns: np