def make_test_class(model_tester, instance):
    """
    Return a string with a plausible source code representation for a
    ModelTester test class.
    """

    base_names = ", ".join(cls.__name__ for cls in type(model_tester).__bases__)
    base = f"""
    class {model_tester.__class__.__name__}({base_names}):
        model = models.{instance.__class__.__name__}
        representation = {repr(str(instance))}"""
    if model_tester.db:
        base += "\n        db = True"
    if hasattr(instance, "get_absolute_url"):
        base += "\n        absolute_url = {instance.get_absolute_url()!r}"
    return base