docstr: Helper for the built-in unicode function.
docstr_tok: ["Helper","for","the","built-in","unicode","function","."]
code: def __unicode__(self):
      """Helper for the built-in unicode function."""
      uchunks = []
      lastcs = None
      for s, charset in self._chunks:
          # We must preserve spaces between encoded and non-encoded word
          # boundaries, which means for us we need to add a space when we go
          # from a charset to None/us-ascii, or from None/us-ascii to a
          # charset.  Only do this for the second and subsequent chunks.
          nextcs = charset
          if uchunks:
              if lastcs not in (None, "us-ascii"):
                  if nextcs in (None, "us-ascii"):
                      uchunks.append(USPACE)
                      nextcs = None
              elif nextcs not in (None, "us-ascii"):
                  uchunks.append(USPACE)
          lastcs = nextcs
          uchunks.append(unicode(s, str(charset)))
      return UEMPTYSTRING.join(uchunks)
  
imports: import re
  import binascii
  import email.quoprimime
  import email.base64mime
  from email.errors import HeaderParseError
  from email.charset import Charset
label_desc: Use image node_id 3 for calling the Header obj's underlying member method code with example usage: obj.__unicode__() and returns: UEMPTYSTRING