class_docstr: Writer of UCI format for :class:`gensim.corpora.ucicorpus.UciCorpus`.
  
  Notes
  ---------
  This corpus format is identical to `Matrix Market format<http://math.nist.gov/MatrixMarket/formats.html>,
  except for different file headers. There is no format line, and the first three lines of the file
  contain `number_docs`, `num_terms`, and `num_nnz`, one value per line.
docstr: Update headers with actual values.
docstr_tok: ["Update","headers","with","actual","values","."]
code: def update_headers(self, num_docs, num_terms, num_nnz):
      """Update headers with actual values."""
      offset = 0
      values = [
          utils.to_utf8(str(n)) for n in [num_docs, num_terms, num_nnz]
      ]
  
      for value in values:
          if len(value) > len(self.FAKE_HEADER):
              raise ValueError("Invalid header: value too large!")
          self.fout.seek(offset)
          self.fout.write(value)
          offset += len(self.FAKE_HEADER)
  
imports: import logging
  from collections import defaultdict
  from gensim import utils
  from gensim.corpora import Dictionary
  from gensim.corpora import IndexedCorpus
  from gensim.matutils import MmReader
  from gensim.matutils import MmWriter
label_desc: Use image node_id 2 for calling the UciWriter obj's underlying member method code with example usage: obj.update_headers(num_docs, num_terms, num_nnz) without return types