original_docstring: We use encode() from imaplib's _Authenticator, but it is a private class so we can't just import it. That
          method's docstring is:
              Invoke binascii.b2a_base64 iteratively with short even length buffers, strip the trailing line feed from
              the result and append. 'Even' means a number that factors to both 6 and 8, so when it gets to the end of
              the 8-bit input there's no partial 6-bit output.
docstring: We use encode() from imaplib's _Authenticator, but it is a private class so we can't just import it. That
  method's docstring is:
  Invoke binascii.b2a_base64 iteratively with short even length buffers, strip the trailing line feed from
  the result and append. 'Even' means a number that factors to both 6 and 8, so when it gets to the end of
  the 8-bit input there's no partial 6-bit output.
docstring_tokens: We use encode () from imaplib ' s _Authenticator but it is a private class so we can ' t just import it . That method ' s docstring is : Invoke binascii . b2a_base64 iteratively with short even length buffers strip the trailing line feed from the result and append . ' Even ' means a number that factors to both 6 and 8 so when it gets to the end of the 8 - bit input there ' s no partial 6 - bit output .
code: def encode_oauth2_string(input_string):
          """We use encode() from imaplib's _Authenticator, but it is a private class so we can't just import it. That
          method's docstring is:
              Invoke binascii.b2a_base64 iteratively with short even length buffers, strip the trailing line feed from
              the result and append. 'Even' means a number that factors to both 6 and 8, so when it gets to the end of
              the 8-bit input there's no partial 6-bit output."""
          output_bytes = b''
          if isinstance(input_string, str):
              input_string = input_string.encode('utf-8')
          while input_string:
              if len(input_string) > 48:
                  t = input_string[:48]
                  input_string = input_string[48:]
              else:
                  t = input_string
                  input_string = b''
              e = binascii.b2a_base64(t)
              if e:
                  output_bytes = output_bytes + e[:-1]
          return output_bytes
code_tokens: def encode_oauth2_string ( input_string ) : output_bytes = b'' if isinstance ( input_string , str ) : input_string = input_string . encode ( 'utf-8' ) while input_string : if len ( input_string ) > 48 : t = input_string [ : 48 ] input_string = input_string [ 48 : ] else : t = input_string input_string = b'' e = binascii . b2a_base64 ( t ) if e : output_bytes = output_bytes + e [ : - 1 ] return output_bytes
short_docstring: We use encode() from imaplib's _Authenticator, but it is a private class so we can't just import it.
short_docstring_tokens: We use encode () from imaplib ' s _Authenticator but it is a private class so we can ' t just import it .
comment: """We use encode() from imaplib's _Authenticator, but it is a private class so we can't just import it. That
          method's docstring is:
              Invoke binascii.b2a_base64 iteratively with short even length buffers, strip the trailing line feed from
              the result and append. 'Even' means a number that factors to both 6 and 8, so when it gets to the end of
              the 8-bit input there's no partial 6-bit output."""