import base64


def base64_decode(encoded_data):
    """Decode base64 encoded string with or without padding.
    :type encoded_data: str | unicode
    :rtype: str
    """
    return base64.b64decode(encoded_data + '=' * (-len(encoded_data) % 4))
