def update(self, instance, validated_data):
is_primary = validated_data.pop("<STR_LIT>", False)<EOL>instance = super(EmailSerializer, self).update(<EOL>instance, validated_data<EOL>)<EOL>if is_primary:<EOL><INDENT>instance.set_primary()<EOL><DEDENT>return instance<EOL>
Update the instance the serializer is bound to.

Args:
    instance:
        The instance the serializer is bound to.
    validated_data:
        The data to update the serializer with.

Returns:
    The updated instance.