Returns a ``Connection`` instance for the given objects or ``None`` if
        there's no connection.

def get_connection(self, from_obj, to_obj):
        """
        Returns a ``Connection`` instance for the given objects or ``None`` if
        there's no connection.
        """
        self._validate_ctypes(from_obj, to_obj)
        try:
            return self.connections.get(from_pk=from_obj.pk, to_pk=to_obj.pk)
        except Connection.DoesNotExist:
            return None