code: def _add_ops_id_score_list(self, net, version):
      assert (
          self.reducer in self._id_score_list_supported_reducers
      ), "Unsupported reducer: {} for ID_SCORE_LIST {}".format(
          self.reducer, self.sparse_key
      )
      if self.reducer in ["WeightedSum", "WeightedMean"]:
          self._sparse_lengths_weighted_reducer(
              self.input_record.keys(),
              self.input_record.values(),
              self.reducer,
              net,
              version,
          )
  
      elif (
          self.reducer in ["PositionWeighted", "RecencyWeighted"]
          or self.use_external_weights
      ):
          self._sparse_lengths_weighted_reducer(
              self.input_record.keys(),
              self.external_weights,
              "WeightedSum",
              net,
              version,
              grad_on_weights=1,
          )
  
      elif self.reducer in ["Sum", "Mean"]:
          op_input = [
              self.w,
              self.input_record.keys(),
              self.input_record.lengths(),
          ]
  
          layer_name = "SparseLengths" + self.reducer
  
          if version in ["fp32", "fp16"]:
              net.__getattr__(layer_name)(
                  op_input,
                  self.output_schema.field_blobs(),
              )
          elif version == "uint8rowwise":
              net.__getattr__(layer_name + "8BitsRowwise")(
                  op_input, self.output_schema.field_blobs()
              )
          elif version == "fused_uint8rowwise":
              net.__getattr__(layer_name + "Fused8BitRowwise")(
                  op_input, self.output_schema.field_blobs()
              )
          elif version == "fused_uint4rowwise":
              net.__getattr__(layer_name + "Fused4BitRowwise")(
                  op_input, self.output_schema.field_blobs()
              )
          else:
              raise "Unsupported version of operator in SparseLookUp " + "layer: {0} for sparse feature {1}".format(
                  version, self.sparse_key
              )
  
      elif self.reducer == "None":
          # Gather operator will gather the embedding for each id of
          # each IdList.
          self._gather_wrapper(
              net,
              version,
              self.input_record.keys(),
              self.output_schema.field_blobs(),
          )
      else:
          raise "Only Sum, Mean, None are supported for IdScoreList input." + "Trying to create with {} for sparse feature {}".format(
              self.reducer, self.sparse_key
          )
  
imports: from caffe2.python.optimizer import FP16_ENGINES, Optimizer
  from caffe2.python.helpers.arg_scope import get_current_scope
  from caffe2.python import schema
  from caffe2.python.layers.layers import get_categorical_limit, get_key, IdList, IdScoreList, IdListWithEvicted, IdScoreListWithEvicted, LayerPsParam, ModelLayer, almost_equal_schemas
  import collections
  import functools
  import logging
  import math
  import numpy
  import operator
label_desc: Use image node_id 10 for calling the SparseLookup obj's underlying member method code with example usage: obj._add_ops_id_score_list(net, version) without return types