code: def check_example(self, example):
          "Raise ValueError if example has any invalid values."
          if self.values:
              for a in self.attrs:
                  if example[a] not in self.values[a]:
                      raise ValueError('Bad value %s for attribute %s in %s' %
                                       (example[a], self.attrnames[a], example)f check_example(self, example):
          "Raise ValueError if example has any invalid values."
          if self.values:
              for a in self.attrs:
                  if example[a] not in self.values[a]:
                      raise ValueError('Bad value %s for attribute %s in %s' %
                                       (example[a], self.attrnames[a], example))
docs: Raise ValueError if example has any invalid values.