def add_extension(name, extension):
    """Adds an extension to the name if necessary
    Example:
    >>> add_extension('myfile', '.csv')
    >>> 'myfile.csv'
    """
    return name if name.endswith(extension) else name + extension