code: def getstate(self):
      # state info we return to the caller:
      # 0: stream is in natural order for this platform
      # 2: endianness hasn't been determined yet
      # (we're never writing in unnatural order)
      return 2 if self.encoder is None else 0
  
imports: import codecs, sys
label_desc: Use image node_id 4 for calling the IncrementalEncoder obj's underlying member method code with example usage: obj.getstate() and returns: unknown