def METHOD_NAME(model):
    try:
        kc_model = getattr(kolibri_content_models, model.__name__)
        base_model = getattr(base_models, model.__name__)
    except AttributeError:
        # This will happen if it's a M2M through model, which only exist on ContentNode
        through_model_name = model.__name__.replace("ContentNode_", "")
        kc_model = getattr(kolibri_content_models.ContentNode, through_model_name).through
        # Through models are not defined for the abstract base models, so we just cheat and
        # use these instead.
        base_model = kc_model
    return kc_model, base_model