code: def b64encode(source):
      
      if compat.PY3:
          source = source.encode('utf-8')
      return base64.b64encode(source).decode('utf-8')
docs: Base64 encoding for python 2 and 3
      
      :rtype: base64 content