def _write_numpy_item(output_file, item):
  """Write the item to a numpy save file.

  Args:
    output_file: Filename string or FileLike object.
    item: Some object to save as the first item.
  """
  if isinstance(output_file, str):
    with tf.io.gfile.GFile(output_file, 'wb') as fh:
      numpy.save(fh, item)
  else:
    numpy.save(output_file, item)
Write the item to a numpy save file.

  Args:
    output_file: Filename string or FileLike object.
    item: Some object to save as the first item.
  
language/nql/nql/io.py