code: def validate(self, instance, value):
          
          try:
              intval = int(value)
              if not self.cast and abs(value - intval) > TOL:
                  self.error(
                      instance=instance,
                      value=value,
                      extra='Not within tolerance range of {}.'.format(TOL),
                  )
          except (TypeError, ValueError):
              self.error(instance, value, extra='Cannot cast to integer.')
          _in_bounds(self, instance, intval)
          return intval
docs: Checks that value is an integer and in min/max bounds