def get_class(class_string):
    """ Returns class object specified by a string.
        Arguments:
            class_string -- The string representing a class.

        Raises:
            ValueError if module part of the class is not specified.
    """
    module_name, _, class_name = class_string.rpartition('.')
    if module_name == '':
        raise ValueError('Class name must contain module part.')
    return getattr(__import__(module_name, globals(), locals(), [class_name], -1), class_name)