class_docstr: Serialize datapoints to bytes (by tensorpack's default serializer) and write to a TFRecord file.
  
  Note that TFRecord does not support random access and is in fact not very performant.
  It's better to use :class:`LMDBSerializer`.
class_docstr_tok: ["Serialize","datapoints","to","bytes","(","by","tensorpack","'s","default","serializer",")","and","write","to","a","TFRecord","file",".","Note","that","TFRecord","does","not","support","random","access","and","is","in","fact","not","very","performant",".","It","'s","better","to","use",":","class",":","`","LMDBSerializer","`","."]
docstr: Args:
      df (DataFlow): the DataFlow to serialize.
      path (str): output tfrecord file.
docstr_tok: ["Args",":","df","(","DataFlow",")",":","the","DataFlow","to","serialize",".","path","(","str",")",":","output","tfrecord","file","."]
code: def save(df, path):
      """
      Args:
          df (DataFlow): the DataFlow to serialize.
          path (str): output tfrecord file.
      """
      size = _reset_df_and_get_size(df)
      with tf.python_io.TFRecordWriter(path) as writer, get_tqdm(
          total=size
      ) as pbar:
          for dp in df:
              writer.write(dumps(dp))
              pbar.update()
  
imports: import numpy
  import os
  import platform
  from collections import defaultdict
  from ..utils import logger
  from ..utils.serialize import dumps, loads
  from ..utils.develop import create_dummy_class
  from ..utils.utils import get_tqdm
  from .base import DataFlow
  from .common import FixedSizeData, MapData
  from .format import HDF5Data, LMDBData, DiskCacheData
  from .raw import DataFromGenerator, DataFromList
label_desc: Use image node_id 1 for calling the TFRecordSerializer obj's underlying member method code with example usage: obj.save(df, path) without return types