def validate_serializer(serializer, _type):
if not issubclass(serializer, _type):<EOL><INDENT>raise ValueError("<STR_LIT>".format(_type.__name__))<EOL><DEDENT>
Validates the serializer for given type.

:param serializer: (Serializer), the serializer to be validated.
:param _type: (Type), type to be used for serializer validation.