<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_default_parser(parser):
 """ Set defaulr parser instance Parameters parser : instance or string An instance or registered name of parser class. The specified parser instance will be used when user did not specified :attr:`parser` in :func:`maidenhair.functions.load` function. See also -------- :func:`maidenhair.utils.plugins.Registry.register` : Register new class """

    if isinstance(parser, basestring):
        parser = registry.find(parser)()
    if not isinstance(parser, BaseParser):
        parser = parser()
    global _parser
    _parser = parser