code: def testCompatInvalidEncoding(self):
      with self.assertRaises(LookupError):
          compat.as_bytes("hello", "invalid")
  
      with self.assertRaises(LookupError):
          compat.as_text(b"hello", "invalid")
  
imports: from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 2 for calling the CompatTest obj's underlying member method code with example usage: obj.testCompatInvalidEncoding() without return types