parameters: (self, columns_to_tensors)
docstring: Handles sparse column to id conversion.
docstring_summary: Handles sparse column to id conversion.
docstring_tokens: Handles sparse column to id conversion .
function: def insert_transformed_feature(self, columns_to_tensors):
      """Handles sparse column to id conversion."""
      sparse_tensor = columns_to_tensors[self.name]
      if self.dtype.is_integer:
        sparse_values = string_ops.as_string(sparse_tensor.values)
      else:
        sparse_values = sparse_tensor.values
  
      sparse_id_values = string_ops.string_to_hash_bucket_fast(
          sparse_values, self.bucket_size, name="lookup")
      columns_to_tensors[self] = ops.SparseTensor(
          sparse_tensor.indices, sparse_id_values, sparse_tensor.shape)
function_tokens: def insert_transformed_feature ( self , columns_to_tensors ) : sparse_tensor = columns_to_tensors [ self . name ] if self . dtype . is_integer : sparse_values = string_ops . as_string ( sparse_tensor . values ) else : sparse_values = sparse_tensor . values sparse_id_values = string_ops . string_to_hash_bucket_fast ( sparse_values , self . bucket_size , name = "lookup" ) columns_to_tensors [ self ] = ops . SparseTensor ( sparse_tensor . indices , sparse_id_values , sparse_tensor . shape )