def load_dynamic_class(fqn, subclass):
    if not isinstance(fqn, basestring):
        return fqn

    cls = load_class_from_name(fqn)

    if cls == subclass or not issubclass(cls, subclass):
        raise TypeError("%s is not a valid %s" % (fqn, subclass.__name__))

    return cls
Regression test for bug #7110.
dataset/ETHPy150Open Yelp/fullerite/src/diamond/utils/classes.py/load_dynamic_class--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/select_related_regress/tests.py/SelectRelatedRegressTests.test_regression_7110