docs: def _validate(self, data: Any, schema: AnyMapping) -> Any:
          """Validate data against given schema.
  
          :param data: Data to validate.
          :param schema: Schema to use for validation.
          """
          try:
              return self.validate_func(schema, self._pure_data(data))
          except self.validation_error_class as err:
              logger.error(
                  'Schema validation error',
                  exc_info=True,
                  extra={'schema': schema, 'schema_module': self.module})
              if self.error_class is None:
                  raise
              raise self.make_error('Validation Error', error=err) from err