Deprecation warning on samplebatch builder

I am getting the below warnings for samplebatch builder. I want to switch over to samplecollector/datasetwriter but there is no documentation or examples of how these work. Is there a place to have some documentation around these functions?

2022-05-04 07:37:32,415 WARNING deprecation.py:46 – DeprecationWarning: SampleBatchBuilder has been deprecated. Use a child class of SampleCollector`` instead. This will raise an error in the future!
2022-05-04 07:37:32,415 INFO json_writer.py:50 – You are using JSONWriter. It is recommended to use DatasetWriter instead.