input: Write a python function to test for a NameError when trying to use an undefined variable.
  assert test() == "NameError: Name 'z' is not defined"
output: def test():
      try:
          z
      except NameError as e:
          return str(e)