from tensorflow.python.framework import constant_op

      features = {
          'language':
              sparse_tensor.SparseTensor(
                  values=('en', 'fr', 'zh'),
                  indices=((0, 0), (0, 1), (2, 0)),
                  dense_shape=(3, 2))
      }
      labels = constant_op.constant(((1,), (0,), (0,)))
      return features, labels

    # The given hash_bucket_size results in variables larger than the
    # default min_slice_size attribute, so the variables are partitioned.
    sparse_feature = feature_column.sparse_column_with_hash_bucket(
        'language', hash_bucket_size=2e7)
