@classmethod
def _validate_relationship_config(cls):
    """
        Validate ``cls.CONF_RELATIONSHIP``

        This method should be only called from ``Entity.validate_relationship_config()``,
        SHOULD NOT called from the subclass of :class:`Entity`.
        """
    subclasses = cls.get_all_subclass()
    for subclass in subclasses:
        if len(subclass.CONF_RELATIONSHIP.mapping) == 0:
            continue
        for klass, relationship in subclass.CONF_RELATIONSHIP.mapping.items():
            if klass not in subclasses:
                msg = '`{}` is not subclass of `crawlib2.Entity`'.format(klass
                    .full_classname())
                raise NotImplementedError(msg)
            if relationship.relationship not in ['one', 'many']:
                msg = "`relationship` has to be one of 'one' or 'many'!"
                raise NotImplementedError(msg)
            if relationship.relationship == 'many':
                if not hasattr(subclass, relationship.n_child_key):
                    msg = "`{}` doesn't define `{}` attribute!".format(subclass
                        .full_classname(), relationship.n_child_key)
                    raise NotImplementedError(msg)
