class_docstr: Convert a TextIOBase string stream to a byte stream.
class_docstr_tok: ["Convert","a","TextIOBase","string","stream","to","a","byte","stream","."]
code: def seek(self, offset, whence=0):
      # Random seeks are not allowed because of non-trivial conversion
      # between byte and character offsets,
      # with the possibility of a byte offset landing within a character.
      if offset == 0 and whence == 0 or offset == 0 and whence == 2:
          # seek to start or end is ok
          super().seek(offset, whence)
      else:
          # Drop any other seek
          # In this application this may happen when pystreambuf seeks during sync(),
          # which can happen when closing a partially-read stream.
          # Ex. when mminfo() only reads the header then exits.
          pass
  
imports: import io
  import os
  import numpy
  import scipy.sparse
  from scipy.io import _mmio
label_desc: Use image node_id 7 for calling the _TextToBytesWrapper obj's underlying member method code with example usage: obj.seek(offset, whence) without return types