def _conversion(target, source):
def register(func):<EOL><INDENT>'''<STR_LIT>'''<EOL>__CONVERSION__[target][source] = func<EOL>return func<EOL><DEDENT>return register<EOL>
A decorator to register namespace conversions.

    Usage
    -----
    >>> @conversion('tag_open', 'tag_.*')
    ... def tag_to_open(annotation):
    ...     annotation.namespace = 'tag_open'
    ...     return annotation