<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rng_annotation(self, stmt, p_elem):
 """Append YIN representation of extension statement `stmt`."""

        ext = stmt.i_extension
        prf, extkw = stmt.raw_keyword
        (modname,rev)=stmt.i_module.i_prefixes[prf]
        prefix = self.add_namespace(
            statements.modulename_to_module(self.module,modname,rev))
        eel = SchemaNode(prefix + ":" + extkw, p_elem)
        argst = ext.search_one("argument")
        if argst:
            if argst.search_one("yin-element", "true"):
                SchemaNode(prefix + ":" + argst.arg, eel, stmt.arg)
            else:
                eel.attr[argst.arg] = stmt.arg
        self.handle_substmts(stmt, eel)