def trace(x, succeed=True, show_trace=True):
    """
  Can be included in a list of generators (as in forall and forany) to see where we are.
  The second argument determines whether it succeeds or fails.
  When included in a list of forall generators, succeed should be set to True so that
  it doesn't provent forall from succeeding.
  When included in a list of forany generators, succeed should be set to False so that forany
  will just go on the the next generator one and won't take this one as an extraneous successes.
  """
    if show_trace:
        print(x)
    if succeed:
        yield
