class_docstr: Class for writing Variant protos to VCF or TFRecord files.
class_docstr_tok: ["Class","for","writing","Variant","protos","to","VCF","or","TFRecord","files","."]
code: def _post_init_hook(self):
      # Initialize field_access_cache.  If we are dispatching to a
      # NativeVcfWriter, we use its field_access_cache.  Otherwise, we
      # need to create a new one.
      self.field_access_cache = getattr(
          self._writer,
          "field_access_cache",
          VcfHeaderCache(self.header),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from third_party.nucleus.io import genomics_reader
  from third_party.nucleus.io import genomics_writer
  from third_party.nucleus.io.python import vcf_reader
  from third_party.nucleus.io.python import vcf_writer
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variant_utils
  from third_party.nucleus.util import vcf_constants
label_desc: Use image node_id 2 for calling the VcfWriter obj's underlying member method code with example usage: obj._post_init_hook() without return types