code: def write_to_file(writer, data):
      """
      writes data to tfrecord file
      """
      feature = {"text": _int64_feature(data)}
      tf_example = tf.train.Example(
          features=tf.train.Features(feature=feature)
      )
      writer.write(tf_example.SerializeToString())
  
imports: import argparse
  import os
  import re
  import random
  from pathlib import Path
  from typing import List
  import ftfy
  import tensorflow
  from lm_dataformat import Reader
  from transformers import GPT2TokenizerFast
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: write_to_file(writer, data) without return types