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.ServingIdListFeature
  Output: rlt.IdListFeature
docstr_tok: ["Input",":","rlt.ServingIdListFeature","Output",":","rlt.IdListFeature"]
code: def preprocess_id_list(
      self, id_list: Dict[int, Tuple[torch.Tensor, torch.Tensor]]
  ) -> Dict[str, Tuple[torch.Tensor, torch.Tensor]]:
      """
      Input: rlt.ServingIdListFeature
      Output: rlt.IdListFeature
      """
      ret: Dict[str, Tuple[torch.Tensor, torch.Tensor]] = {}
      for name, mapper in self.id_list_mappers.items():
          fid = self.name2id[name]
          if fid in id_list:
              offsets, values = id_list[fid]
              idx_values = mapper(values)
              ret[name] = (
                  offsets.to(self.device),
                  idx_values.to(self.device),
              )
      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 4 for calling the SparsePreprocessor obj's underlying member method code with example usage: obj.preprocess_id_list(id_list) and returns: ret