code: def test_getstate_returns_expected_value(self):
      # Note: getstate is implemented such that these state values
      # are expected to be the same across all builds of Python,
      # regardless of x32/64 bit, endianness and compiler.
  
      # euc_jis_2004 stores state as a buffer of pending bytes
      buffer_state_encoder = codecs.getincrementalencoder(
          "euc_jis_2004"
      )()
      self.assertEqual(buffer_state_encoder.getstate(), 0)
      buffer_state_encoder.encode("\u00e6")
      self.assertEqual(
          buffer_state_encoder.getstate(),
          int.from_bytes(
              b"\x02" b"\xc3\xa6" b"\x00\x00\x00\x00\x00\x00\x00\x00",
              "little",
          ),
      )
      buffer_state_encoder.encode("\u0300")
      self.assertEqual(buffer_state_encoder.getstate(), 0)
  
      # iso2022_jp stores state without using a buffer
      non_buffer_state_encoder = codecs.getincrementalencoder(
          "iso2022_jp"
      )()
      self.assertEqual(
          non_buffer_state_encoder.getstate(),
          int.from_bytes(
              b"\x00" b"\x42\x42\x00\x00\x00\x00\x00\x00", "little"
          ),
      )
      non_buffer_state_encoder.encode("\u3042")
      self.assertEqual(
          non_buffer_state_encoder.getstate(),
          int.from_bytes(
              b"\x00" b"\xc2\x42\x00\x00\x00\x00\x00\x00", "little"
          ),
      )
  
imports: import _multibytecodec
  import codecs
  import io
  import sys
  import textwrap
  import unittest
  from test import support
  from test.support import os_helper
  from test.support.os_helper import TESTFN
label_desc: Use image node_id 6 for calling the Test_IncrementalEncoder obj's underlying member method code with example usage: obj.test_getstate_returns_expected_value() without return types