code: def test_encode_from_stdin(self):
      with script_helper.spawn_python("-m", "base64", "-e") as proc:
          out, err = proc.communicate(b"a\xffb\n")
      self.assertEqual(out.rstrip(), b"Yf9iCg==")
      self.assertIsNone(err)
  
imports: import unittest
  import base64
  import binascii
  import os
  from array import array
  from test.support import os_helper
  from test.support import script_helper
label_desc: Use image node_id 4 for calling the TestMain obj's underlying member method code with example usage: obj.test_encode_from_stdin() without return types