'Get the related objects manager for the given instance.
The instance must be one of the related classes.  This method will
return the related manager from that instance to instances of the other
related class.'

@classmethod
def _get_related_manager(cls, instance):

    this_model = type(instance)
    models = [entry_class.model for entry_class in cls.related_classes.values()]
    if isinstance(instance, models[0]):
        (this_model, other_model) = models
    else:
        (other_model, this_model) = models
    (_, field) = this_model.objects.determine_relationship(other_model)
    this_models_fields = (this_model._meta.fields + this_model._meta.many_to_many)
    if (field in this_models_fields):
        manager_name = field.attname
    else:
        manager_name = field.related.get_accessor_name()
    return getattr(instance, manager_name)
