<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def import_class(class_path):
 """imports and returns given class string. :param class_path: Class path as string :type class_path: str :returns: Class that has given path :rtype: class :Example: 'OrderedDict' """

    try:
        from django.utils.importlib import import_module
        module_name = '.'.join(class_path.split(".")[:-1])
        mod = import_module(module_name)
        return getattr(mod, class_path.split(".")[-1])
    except Exception, detail:
        raise ImportError(detail)