qiskit/validation/base.py
def _validate(instance):
        """Validate the internal representation of the instance."""
        try:
            _ = instance.schema.validate(instance.to_dict())
        except ValidationError as ex:
            raise ModelValidationError(
                ex.messages, ex.field_names, ex.fields, ex.data, **ex.kwargs)
def _validate(instance):
        """Validate the internal representation of the instance."""
        try:
            _ = instance.schema.validate(instance.to_dict())
        except ValidationError as ex:
            raise ModelValidationError(
                ex.messages, ex.field_names, ex.fields, ex.data, **ex.kwargs)
Validate the internal representation of the instance.