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"]
code: def __getstate__(self):
      # Return a dictionary of picklable attributes
      # Notice, this method should not be scripted!
      # This method is for pickle only, which is used in Inter Process Communication (IPC)
      # , i.e., copy objects across multi-processes
      return {
          "id2name": self._id2name,
          "name2id": self._name2id,
          "id_list_mappers": self._id_list_mappers,
          "id_score_list_mappers": self._id_score_list_mappers,
          "device": self.device,
          "gen_torch_script": self.gen_torch_script,
      }
  
imports: import abc
  import logging
  from typing import cast, Dict, Tuple
  import reagent.core.types
  import torch
label_desc: Use image node_id 2 for calling the SparsePreprocessor obj's underlying member method code with example usage: obj.__getstate__() and returns: dict