code: def test_encode_default_args(self):
      self.checkequal(b"hello", "hello", "encode")
      # Check that encoding defaults to utf-8
      self.checkequal(b"\xf0\xa3\x91\x96", "\U00023456", "encode")
      # Check that errors defaults to 'strict'
      self.checkraises(UnicodeError, "\ud800", "encode")
  
file_path: cpython/Lib/test/test_userstring.py
imports: import unittest
  from test import string_tests
  from collections import UserString
label_desc: Use image node_id 5 for calling the UserStringTest obj's underlying member method code with example usage: obj.test_encode_default_args() without return types