code: def _validate_children(self):
          
          for child in self._children:
              if child.__class__ not in self._allowed_children:
                  raise ValueError(
                      "Child %s is not allowed as a children for this %s type entity." % (
                          child, self.__class__
                      )
                  )
docs: Check that the children we have are allowed here.