def load(target, source_module=None):
module, klass, function = _get_module(target)<EOL>if not module and source_module:<EOL><INDENT>module = source_module<EOL><DEDENT>if not module:<EOL><INDENT>raise MissingModule(<EOL>"<STR_LIT>")<EOL><DEDENT>actual_module = sys.modules[module]<EOL>if not klass:<EOL><INDENT>return getattr(actual_module, function)<EOL><DEDENT>class_object = getattr(actual_module, klass)<EOL>if function:<EOL><INDENT>return getattr(class_object, function)<EOL><DEDENT>return class_object<EOL>
Get the actual implementation of the target.