class_docstr: Shard that is being written.
docstr: Closes the writer.
docstr_tok: ["Closes","the","writer","."]
code: def close_writer(self) -> None:
      """Closes the writer."""
      if hasattr(self.writer, "flush"):
          self.writer.flush()
      self.writer.close()
  
imports: from __future__ import annotations
  import dataclasses
  import os
  from typing import Any, Dict, List, Optional
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import example_serializer
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import array_record_module
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling the Shard obj's underlying member method code with example usage: obj.close_writer() without return types