def get_external_model(class_object):
class_abstract = class_object.CodenerixMeta.abstract<EOL>if class_abstract is not None:<EOL><INDENT>for class_related in class_object._meta.related_objects:<EOL><INDENT>if issubclass(class_related.related_model, class_abstract):<EOL><INDENT>return class_related.related_model<EOL><DEDENT><DEDENT><DEDENT>return None<EOL>
Given a class (class_object), it locates the related model (throught the codenerix abstract class)