import re


def ensure_https(uri):
    """ takes a URI and ensures it has https protocol
    :param uri: `str`
    :return: `str`
    """
    if uri.startswith('http:'):
        return re.sub('^http', 'https', uri)

    return uri