docs: def _apply_validator_chain(chain, value, handler):
      """Apply validators in sequence to a value."""
  
      if hasattr(chain, 'validate'):  # not a list
          chain = [chain, ]
  
      for validator in chain:
          if hasattr(validator, 'validate'):
              value = validator.validate(value, handler)
          else:
              raise web.HTTPError(500)
      return value