Load the module and return the required class.

def _load_class(class_path):
    """Load the module and return the required class."""
    parts = class_path.rsplit('.', 1)
    module = __import__(parts[0], fromlist=parts[1])
    return getattr(module, parts[1])