class_docstr: Base class for file writer.
  
  FileWriter consumes a DataSource and generates benchmark data as described
  in the DataSource. DataSource contains benchmark data metadata such as value
  generators, total number of records, and number of partitioned files.
  
  SubClass must implement `_write_to_path` function to write data under the
  given path and follow the spec described in DataSource.
class_docstr_tok: ["Base","class","for","file","writer",".","FileWriter","consumes","a","DataSource","and","generates","benchmark","data","as","described","in","the","DataSource",".","DataSource","contains","benchmark","data","metadata","such","as","value","generators",",","total","number","of","records",",","and","number","of","partitioned","files",".","SubClass","must","implement","`","_write_to_path","`","function","to","write","data","under","the","given","path","and","follow","the","spec","described","in","DataSource","."]
docstr: Generate benchmark data and write the data under the given path.
  
  Args:
    dir_path: A str path to write files to.
    data_source: A DataSource object.
  
  Raises:
    NotImplementedError: If subclass does not overload the function.
docstr_tok: ["Generate","benchmark","data","and","write","the","data","under","the","given","path",".","Args",":","dir_path",":","A","str","path","to","write","files","to",".","data_source",":","A","DataSource","object",".","Raises",":","NotImplementedError",":","If","subclass","does","not","overload","the","function","."]
code: def _write_to_path(self, dir_path, data_source):
      """Generate benchmark data and write the data under the given path.
  
      Args:
        dir_path: A str path to write files to.
        data_source: A DataSource object.
  
      Raises:
        NotImplementedError: If subclass does not overload the function.
      """
      raise NotImplementedError
  
file_path: io/tests/test_atds_avro/utils/file_writer.py
imports: import abc
  import os
  import shutil
  import hashlib
  import tempfile
  import tensorflow
label_desc: Use image node_id 5 for calling the FileWriter obj's underlying member method code with example usage: obj._write_to_path(dir_path, data_source) without return types