<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fail(message, exception_data=None):
 """ Print a failure message and exit nonzero """

  print(message, file=sys.stderr)
  if exception_data:
    print(repr(exception_data))
  sys.exit(1)