def encode(self, validator, value):<EOL>
raise NotImplementedError<EOL>
Validate ``value`` using ``validator`` and return the encoding.

Args:
    validator: the ``stone_validators.Validator`` used to validate
        ``value``
    value: the object to encode

Returns:
    The encoded object. This is implementation-defined.

Raises:
    stone_validators.ValidationError: Raised if ``value`` (or one
        of its sub-values).