def to_file_name(image_name: str, extension: str = 'jpg'):
    """
    Converts the name of an image to the corresponding file name.
    Example: image -> image.jpg
    :param extension: the file extension
    :param image_name: the name of an image
    :return: the file name of the given image
    """
    if extension not in image_name:
        image_name = image_name + '.' + extension
    return image_name