class_docstr: Performs preprocessing for sparse features (i.e. id_list, id_score_list)
  
  Functionality includes:
  (1) changes keys from feature_id to feature_name, for better debuggability
  (2) maps sparse ids to embedding table indices based on id_mapping
  (3) filters out ids which aren't in the id2name
class_docstr_tok: ["Performs","preprocessing","for","sparse","features","(","i.e",".","id_list",",","id_score_list",")","Functionality","includes",":","(","1",")","changes","keys","from","feature_id","to","feature_name",",","for","better","debuggability","(","2",")","maps","sparse","ids","to","embedding","table","indices","based","on","id_mapping","(","3",")","filters","out","ids","which","are","n't","in","the","id2name"]
docstr: Input: rlt.ServingIdScoreListFeature
  Output: rlt.IdScoreListFeature
docstr_tok: ["Input",":","rlt.ServingIdScoreListFeature","Output",":","rlt.IdScoreListFeature"]
code: def preprocess_id_score_list(
      self,
      id_score_list: Dict[
          int, Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
      ],
  ) -> Dict[str, Tuple[torch.Tensor, torch.Tensor, torch.Tensor]]:
      """
      Input: rlt.ServingIdScoreListFeature
      Output: rlt.IdScoreListFeature
      """
      ret: Dict[
          str, Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
      ] = {}
      for name, mapper in self.id_score_list_mappers.items():
          fid = self.name2id[name]
          if fid in id_score_list:
              offsets, keys, values = id_score_list[fid]
              idx_keys, weights = mapper(keys, values)
              ret[name] = (
                  offsets.to(self.device),
                  idx_keys.to(self.device),
                  weights.to(self.device).float(),
              )
      return ret
  
imports: import abc
  import logging
  from typing import cast, Dict, Tuple
  import reagent.core.types
  import torch
label_desc: Use image node_id 5 for calling the SparsePreprocessor obj's underlying member method code with example usage: obj.preprocess_id_score_list(id_score_list) and returns: ret