def take_parenting(self, inst):
if self is inst:<EOL><INDENT>return<EOL><DEDENT>for decl in inst.declarations:<EOL><INDENT>decl.parent = self<EOL>self.declarations.append(decl)<EOL><DEDENT>inst.declarations = []<EOL>
Takes parenting from inst and transfers it to self.

Args:
    inst (namespace_t): a namespace declaration