import tempfile


def write_paradigm(paradigm, session):
    """Function to write a paradigm to a file and return the address
    """
    csvfile = tempfile.mkdtemp() + '/paradigm.csv'
    paradigm.write_to_csv(csvfile, session)
    return csvfile