def teardown(*teardown_functions):
  """Decorator that reigsters teardown functions with a test.

  The functions passed in as teardown functions take an optional 'context'
  parameter of type checkers.Context.

  Note that the decorator takes in Test instances, so this decorator should be
  used *above* the @checkers.test decorator (so that the @checkers.test
  decorator will have already been applied and returned a Test instance.)

  Args:
    *teardown_functions: (functions) Functions to be called after the test runs.

  Returns:
    function: Decorator that will add teardown functions to the test.
  """
  def teardown_decorator(checkers_test):
    for teardown_function in teardown_functions:
      checkers_test.teardown.register(teardown_function)
    return checkers_test
  return teardown_decorator