def _find_subclass(cls, module):
        """
        Attempt to find subclass of :class:`RelationBase` in the given module.

        Note: This means strictly subclasses and not :class:`RelationBase` itself.
        This is to prevent picking up :class:`RelationBase` being imported to be
        used as the base class.
        """
        for attr in dir(module):
            candidate = getattr(module, attr)
            if (isclass(candidate) and issubclass(candidate, cls) and
                    candidate is not RelationBase):
                return candidate
        return None