def insert_transformed_feature(self, columns_to_tensors): """Handles sparse column to id conversion.""" columns_to_tensors[self] = contrib_lookup_ops.string_to_index( tensor=columns_to_tensors[self.name], mapping=list(self.lookup_config.keys), default_value=self.lookup_config.default_value, name=self.name + "_lookup")