<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_intent_parser(self, intent_parser, domain=0):
 """ Register a intent parser with a domain. Args: intent_parser(intent):
 The intent parser you wish to register. domain(str):
 a string representing the domain you wish register the intent parser to. """

        if domain not in self.domains:
            self.register_domain(domain=domain)
        self.domains[domain].register_intent_parser(
            intent_parser=intent_parser)