code: def validate_examples(self, fail_fn):
          
          for collection, doc in self.examples():
              _log.debug("validating example in collection {}".format(collection))
              sch = schema.get_schema(collection)  # with more err. checking
              result = sch.validate(doc)
              _log.debug("validation result: {}".format("OK" if result is None else result))
              if result is not None:
                  fail_fn("Failed to validate sample document: {}".format(result))
docs: Check the examples against the schema.
  
          :param fail_fn: Pass failure messages to this function
          :type fail_fn: function(str)