def get_objects(classpath, calling_classpath="<STR_LIT>"):
<EOL><INDENT>module_name, class_name = classpath.rsplit('<STR_LIT:.>', <NUM_LIT:1>)<EOL>module = importlib.import_module(module_name, calling_classpath)<EOL>try:<EOL><INDENT>klass = getattr(module, class_name)<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise AttributeError("<STR_LIT>".format(<EOL>module.__name__,<EOL>class_name,<EOL>classpath<EOL>))<EOL><DEDENT>return module, klass<EOL><DEDENT>
given a classpath like foo.bar.Baz return module foo.bar and class Baz
objects

.. seealso::
    https://docs.python.org/2.5/whatsnew/pep-328.html
    https://www.python.org/dev/peps/pep-0328/

:param classpath: string, the full python class path (includes modules), a classpath
    is something like foo.bar.Che where Che is the class definied in the foo.bar
    module
:param calling_classpath: string, if classpath is relative (eg, ..foo.Bar) then
    this is needed to resolve the relative classpath, it is usually the path of
    the module that is calling get_objects()
:returns: tuple, (module, class)