new_contents: import snoop
  
  
  @snoop(depth=2)
  def main():
      return list(x * 2 for x in [1, 2])
  
  
  if __name__ == '__main__':
      main()
  
  expected_output = """
  12:34:56.78 >>> Call to main in File "/path/to_file.py", line 5
  12:34:56.78    5 | def main():
  12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78 >>> Start generator <genexpr> in File "/path/to_file.py", line 6
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78 .......... Iterating over <tupleiterator object at 0xABC>
      12:34:56.78 .......... x = 1
      12:34:56.78 <<< Yield value from <genexpr>: 2
      12:34:56.78 >>> Re-enter generator <genexpr> in File "/path/to_file.py", line 6
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78 .......... Iterating over <tupleiterator object at 0xABC>
      12:34:56.78 .......... x = 2
      12:34:56.78 <<< Yield value from <genexpr>: 4
      12:34:56.78 >>> Re-enter generator <genexpr> in File "/path/to_file.py", line 6
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
      12:34:56.78 .......... Iterating over <tupleiterator object at 0xABC>
      12:34:56.78 .......... x = 2
      12:34:56.78 <<< Return value from <genexpr>: None
  12:34:56.78    6 |     return list(x * 2 for x in [1, 2])
  12:34:56.78 <<< Return value from main: [2, 4]
  """
  
subject: Test generator expressions