def _got_features(self, features):
self.features = features<EOL>logger.debug("<STR_LIT>")<EOL>handled = self.event(GotFeaturesEvent(self.features))<EOL>logger.debug("<STR_LIT>".format(handled))<EOL>if not handled:<EOL><INDENT>mandatory_handled = []<EOL>mandatory_not_handled = []<EOL>logger.debug("<STR_LIT>"<EOL>.format(self._stream_feature_handlers))<EOL>for handler in self._stream_feature_handlers:<EOL><INDENT>ret = handler.handle_stream_features(self, self.features)<EOL>if ret is None:<EOL><INDENT>continue<EOL><DEDENT>elif isinstance(ret, StreamFeatureHandled):<EOL><INDENT>if ret.mandatory:<EOL><INDENT>mandatory_handled.append(unicode(ret))<EOL>break<EOL><DEDENT>break<EOL><DEDENT>elif isinstance(ret, StreamFeatureNotHandled):<EOL><INDENT>if ret.mandatory:<EOL><INDENT>mandatory_not_handled.append(unicode(ret))<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(ret))<EOL><DEDENT><DEDENT>if mandatory_not_handled and not mandatory_handled:<EOL><INDENT>self.send_stream_error("<STR_LIT>")<EOL>raise FatalStreamError(<EOL>u"<STR_LIT>"<EOL>+ u"<STR_LIT:U+0020>".join(mandatory_not_handled))<EOL><DEDENT><DEDENT>
Process incoming <stream:features/> element.

        [initiating entity only]

        The received features node is available in `features`.