code: def _close_on_exit(writers):
      """Call close on all writers on exit."""
      try:
          yield writers
      finally:
          for writer in writers:
              writer.close()
  
file_path: scenic/scenic/projects/vid2seq/generate_from_file.py
imports: import contextlib
  import math
  import os
  from typing import Optional, Sequence
  from absl import app
  from absl import flags
  import numpy
  import pandas
  import tensorflow
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: _close_on_exit(writers) without return types