Implement contains(parent, child)