def add_extension_to_path(file_path, extension):
    """
    Utility function to add the file extension when it is not provided by the
    user in the file path.

    Parameters
    ----------
    file_path : str
        The file path.

    Returns
    -------
    str :
        The file path with the extension appended.
    str :
        The file format extension.
    """
    end = '.{}'.format(extension)
    if not file_path.endswith(end):
        file_path = '{}{}'.format(file_path, end)
    return file_path
