def METHOD_NAME(self, child):
    if isinstance(child, (FileDROP, DirectoryContainer)):
        path = child.path
        if os.path.dirname(path) != self.path:
            raise InvalidRelationshipException(
                DROPRel(child, DROPLinkType.CHILD, self),
                "Child DROP is not under %s" % (self.path),
            )
        ContainerDROP.METHOD_NAME(self, child)
    else:
        raise TypeError(
            "Child DROP is not of type FileDROP or DirectoryContainer"
        )