import re


def canonize_url(url):
    """Modify URL to a standardized format (e.g. add slash at the and if it is
    not there.)

    :return: canonized URL
    """

    # add slash at the and if it's not there
    if not re.match(".*/$", url):
        url = url + "/"

    return url