@staticmethod<EOL><INDENT>def is_defined_in_xxx(xxx, cls):<DEDENT>
if not cls.parent:<EOL><INDENT>return False<EOL><DEDENT>if not isinstance(cls.parent, namespace.namespace_t):<EOL><INDENT>return False<EOL><DEDENT>if xxx != cls.parent.name:<EOL><INDENT>return False<EOL><DEDENT>xxx_ns = cls.parent<EOL>if not xxx_ns.parent:<EOL><INDENT>return False<EOL><DEDENT>if not isinstance(xxx_ns.parent, namespace.namespace_t):<EOL><INDENT>return False<EOL><DEDENT>if xxx_ns.parent.name != '<STR_LIT>':<EOL><INDENT>return False<EOL><DEDENT>global_ns = xxx_ns.parent<EOL>return None is global_ns.parent<EOL>
Small helper method that checks whether the class `cls` is defined
under `::xxx` namespace