def is_base_and_derived(based, derived):
assert isinstance(based, class_declaration.class_t)<EOL>assert isinstance(derived, (class_declaration.class_t, tuple))<EOL>if isinstance(derived, class_declaration.class_t):<EOL><INDENT>all_derived = ([derived])<EOL><DEDENT>else:  <EOL><INDENT>all_derived = derived<EOL><DEDENT>for derived_cls in all_derived:<EOL><INDENT>for base_desc in derived_cls.recursive_bases:<EOL><INDENT>if base_desc.related_class == based:<EOL><INDENT>return True<EOL><DEDENT><DEDENT><DEDENT>return False<EOL>
returns True, if there is "base and derived" relationship between
    classes, False otherwise