class_docstr: Data loader for FFM format based models, such as xDeepFM.
  Iterator will not load the whole data into memory. Instead, it loads data into memory
  per mini-batch, so that large files can be used as input data.
docstr: Convert data into numpy arrays that are good for further operation.
  
  Args:
      labels (list): a list of ground-truth labels.
      features (list): a 3-dimensional list, carrying a list (batch_size) of feature array,
              where each feature array is a list of `[field_idx, feature_idx, feature_value]` tuple.
  
  Returns:
      dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
docstr_tok: ["Convert","data","into","numpy","arrays","that","are","good","for","further","operation",".","Args",":","labels","(","list",")",":","a","list","of","ground-truth","labels",".","features","(","list",")",":","a","3-dimensional","list",",","carrying","a","list","(","batch_size",")","of","feature","array",",","where","each","feature","array","is","a","list","of","`","[","field_idx",",","feature_idx",",","feature_value","]","`","tuple",".","Returns",":","dict",":","A","dictionary",",","containing","multiple","numpy","arrays","that","are","convenient","for","further","operation","."]
code: def _convert_data(self, labels, features):
      """Convert data into numpy arrays that are good for further operation.
  
      Args:
          labels (list): a list of ground-truth labels.
          features (list): a 3-dimensional list, carrying a list (batch_size) of feature array,
                  where each feature array is a list of `[field_idx, feature_idx, feature_value]` tuple.
  
      Returns:
          dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
      """
      dim = self.feature_cnt
      FIELD_COUNT = self.field_cnt
      instance_cnt = len(labels)
  
      fm_feat_indices = []
      fm_feat_values = []
      fm_feat_shape = [instance_cnt, dim]
  
      dnn_feat_indices = []
      dnn_feat_values = []
      dnn_feat_weights = []
      dnn_feat_shape = [instance_cnt * FIELD_COUNT, -1]
  
      for i in range(instance_cnt):
          m = len(features[i])
          dnn_feat_dic = {}
          for j in range(m):
              fm_feat_indices.append([i, features[i][j][1]])
              fm_feat_values.append(features[i][j][2])
              if features[i][j][0] not in dnn_feat_dic:
                  dnn_feat_dic[features[i][j][0]] = 0
              else:
                  dnn_feat_dic[features[i][j][0]] += 1
              dnn_feat_indices.append(
                  [
                      i * FIELD_COUNT + features[i][j][0],
                      dnn_feat_dic[features[i][j][0]],
                  ]
              )
              dnn_feat_values.append(features[i][j][1])
              dnn_feat_weights.append(features[i][j][2])
              if dnn_feat_shape[1] < dnn_feat_dic[features[i][j][0]]:
                  dnn_feat_shape[1] = dnn_feat_dic[features[i][j][0]]
      dnn_feat_shape[1] += 1
  
      sorted_index = sorted(
          range(len(dnn_feat_indices)),
          key=lambda k: (
              dnn_feat_indices[k][0],
              dnn_feat_indices[k][1],
          ),
      )
  
      res = {}
      res["fm_feat_indices"] = np.asarray(
          fm_feat_indices, dtype=np.int64
      )
      res["fm_feat_values"] = np.asarray(
          fm_feat_values, dtype=np.float32
      )
      res["fm_feat_shape"] = np.asarray(fm_feat_shape, dtype=np.int64)
      res["labels"] = np.asarray(
          [[label] for label in labels], dtype=np.float32
      )
  
      res["dnn_feat_indices"] = np.asarray(
          dnn_feat_indices, dtype=np.int64
      )[sorted_index]
      res["dnn_feat_values"] = np.asarray(
          dnn_feat_values, dtype=np.int64
      )[sorted_index]
      res["dnn_feat_weights"] = np.asarray(
          dnn_feat_weights, dtype=np.float32
      )[sorted_index]
      res["dnn_feat_shape"] = np.asarray(dnn_feat_shape, dtype=np.int64)
      return res
  
file_path: recommenders/recommenders/models/deeprec/io/iterator.py
imports: import numpy
  import tensorflow
  import abc
label_desc: Use image node_id 4 for calling the FFMTextIterator obj's underlying member method code with example usage: obj._convert_data(labels, features) and returns: res