def _set_serializer_by_mime_type(self, mime_type):
<EOL>if isinstance(self._app_iter, BinaryResponse):<EOL><INDENT>self.logger.info("<STR_LIT>")<EOL>return<EOL><DEDENT>for available_serializer in self._serializers:<EOL><INDENT>if available_serializer.content_type() == mime_type:<EOL><INDENT>self._selected_serializer = available_serializer<EOL>self.logger.info("<STR_LIT>" % mime_type)<EOL>return<EOL><DEDENT><DEDENT>self.logger.info("<STR_LIT>" % mime_type)<EOL>raise exception.UnsupportedVocabularyError(mime_type, self.supported_mime_types_str)<EOL>
:param mime_type:
:return:

used by content_type_set to set get a reference to the appropriate serializer