code: def register_intent_parser(self, intent_parser):
          
          if hasattr(intent_parser, 'validate') and callable(intent_parser.validate):
              self.intent_parsers.append(intent_parser)
          else:
              raise ValueError("%s is not an intent parser" % str(intent_parser))
docs: "Enforce" the intent parser interface at registration time.
  
          Args:
              intent_parser(intent): Intent to be registered.
  
          Raises:
              ValueError: on invalid intent