code: def _split(self, s, charset, maxlinelen, splitchars):
      # Split up a header safely for use with encode_chunks.
      splittable = charset.to_splittable(s)
      encoded = charset.from_splittable(splittable, True)
      elen = charset.encoded_header_len(encoded)
      # If the line's encoded length first, just return it
      if elen <= maxlinelen:
          return [(encoded, charset)]
      # If we have undetermined raw 8bit characters sitting in a byte
      # string, we really don't know what the right thing to do is.  We
      # can't really split it because it might be multibyte data which we
      # could break if we split it between pairs.  The least harm seems to
      # be to not split the header at all, but that means they could go out
      # longer than maxlinelen.
      if charset == "8bit":
          return [(s, charset)]
      # BAW: I'm not sure what the right test here is.  What we're trying to
      # do is be faithful to RFC 2822's recommendation that ($2.2.3):
      #
      # "Note: Though structured field bodies are defined in such a way that
      #  folding can take place between many of the lexical tokens (and even
      #  within some of the lexical tokens), folding SHOULD be limited to
      #  placing the CRLF at higher-level syntactic breaks."
      #
      # For now, I can only imagine doing this when the charset is us-ascii,
      # although it's possible that other charsets may also benefit from the
      # higher-level syntactic breaks.
      elif charset == "us-ascii":
          return self._split_ascii(s, charset, maxlinelen, splitchars)
      # BAW: should we use encoded?
      elif elen == len(s):
          # We can split on _maxlinelen boundaries because we know that the
          # encoding won't change the size of the string
          splitpnt = maxlinelen
          first = charset.from_splittable(splittable[:splitpnt], False)
          last = charset.from_splittable(splittable[splitpnt:], False)
      else:
          # Binary search for split point
          first, last = _binsplit(splittable, charset, maxlinelen)
      # first is of the proper length so just wrap it in the appropriate
      # chrome.  last must be recursively split.
      fsplittable = charset.to_splittable(first)
      fencoded = charset.from_splittable(fsplittable, True)
      chunk = [(fencoded, charset)]
      return chunk + self._split(
          last, charset, self._maxlinelen, splitchars
      )
  
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 7 for calling the Header obj's underlying member method code with example usage: obj._split(s, charset, maxlinelen, splitchars) and returns: unknown, list, list, self