docs: def hex_encode(input, errors='strict'):
      """ Encodes the object input and returns a tuple (output
          object, length consumed).
  
          errors defines the error handling to apply. It defaults to
          'strict' handling which is the only currently supported
          error handling for this codec.
  
      """
      assert errors == 'strict'
      temp = binascii.b2a_hex(input)
      output = " ".join(temp[i:i + 2] for i in xrange(0, len(temp), 2))
      return (output, len(input))