def get_external_method(class_object, method_name, *args, **kwargs):
related_model = get_external_model(class_object)<EOL>if related_model is not None:<EOL><INDENT>f = getattr(related_model, method_name, None)<EOL>if f:<EOL><INDENT>instance = related_model()<EOL>return f(instance, *args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>return None<EOL>
Given a class (class_object), a name for a method (method_name) and its arguments,
it searchs for the method in the related model (throught the codenerix abstract class) and
it executes that method or return None if no method is found.