class_docstr: Basic class of models
  
  Attributes:
      hparams (HParams): A HParams object, holds the entire set of hyperparameters.
      train_iterator (object): An iterator to load the data in training steps.
      test_iterator (object): An iterator to load the data in testing steps.
      graph (object): An optional graph.
      seed (int): Random seed.
class_docstr_tok: ["Basic","class","of","models","Attributes",":","hparams","(","HParams",")",":","A","HParams","object",",","holds","the","entire","set","of","hyperparameters",".","train_iterator","(","object",")",":","An","iterator","to","load","the","data","in","training","steps",".","test_iterator","(","object",")",":","An","iterator","to","load","the","data","in","testing","steps",".","graph","(","object",")",":","An","optional","graph",".","seed","(","int",")",":","Random","seed","."]
docstr: Devide labels and preds into several group according to values in group keys.
  
  Args:
      labels (list): ground truth label list.
      preds (list): prediction score list.
      group_keys (list): group key list.
  
  Returns:
      list, list, list:
      - Keys after group.
      - Labels after group.
      - Preds after group.
docstr_tok: ["Devide","labels","and","preds","into","several","group","according","to","values","in","group","keys",".","Args",":","labels","(","list",")",":","ground","truth","label","list",".","preds","(","list",")",":","prediction","score","list",".","group_keys","(","list",")",":","group","key","list",".","Returns",":","list",",","list",",","list",":","-","Keys","after","group",".","-","Labels","after","group",".","-","Preds","after","group","."]
code: def group_labels(self, labels, preds, group_keys):
      """Devide labels and preds into several group according to values in group keys.
  
      Args:
          labels (list): ground truth label list.
          preds (list): prediction score list.
          group_keys (list): group key list.
  
      Returns:
          list, list, list:
          - Keys after group.
          - Labels after group.
          - Preds after group.
  
      """
  
      all_keys = list(set(group_keys))
      all_keys.sort()
      group_labels = {k: [] for k in all_keys}
      group_preds = {k: [] for k in all_keys}
  
      for label, p, k in zip(labels, preds, group_keys):
          group_labels[k].append(label)
          group_preds[k].append(p)
  
      all_labels = []
      all_preds = []
      for k in all_keys:
          all_labels.append(group_labels[k])
          all_preds.append(group_preds[k])
  
      return all_keys, all_labels, all_preds
  
imports: import abc
  import time
  import numpy
  from tqdm import tqdm
  import tensorflow
  from tensorflow.compat.v1 import keras
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 11 for calling the BaseModel obj's underlying member method code with example usage: obj.group_labels(labels, preds, group_keys) and returns: all_keys,  all_labels,  all_preds