def decode_base64(in_str, string_encoding='latin-1'):
    """
    Decodes a base64 string and returns it.

    :Parameters:
        in_str : string
            base64 encoded string
        string_encoding : string
            the encoding of the string, default: 'latin-1'

    :returns: decoded string
    """
    import base64
    return base64.decodestring(in_str.encode(string_encoding))
