def _get_b64_chunks_from_str(string):
 chunks = []
 while True:
  pad_loc = string.find('=')
  if ((pad_loc < 0) or (pad_loc == (len(string) - 1)) or (pad_loc == (len(string) - 2))):
   chunks.append(string)
   return chunks
  if ((pad_loc != (len(string) - 1)) and (string[(pad_loc + 1)] == '=')):
   pad_loc += 1
  chunks.append(string[:(pad_loc + 1)])
  string = string[(pad_loc + 1):]
 return chunks

def _get_b64_chunks_from_str ( string ) : chunks = [ ] while True : pad_loc = string . find ( '=' ) if ( ( pad_loc < 0 ) or ( pad_loc == ( len ( string ) - 1 ) ) or ( pad_loc == ( len ( string ) - 2 ) ) ) : chunks . append ( string ) return chunks if ( ( pad_loc != ( len ( string ) - 1 ) ) and ( string [ ( pad_loc + 1 ) ] == '=' ) ) : pad_loc += 1 chunks . append ( string [ : ( pad_loc + 1 ) ] ) string = string [ ( pad_loc + 1 ) : ] return chunks
given a string of concatenated base64 objects .