def write_gmt(d_gmt, filename):
    """
    Write a dictionary of sets to a gmt file.

    :param d_gmt: a dictionary of sets
    :param filename: filename for the GMT file
    :return: returns nothing
    """
    with open(filename, 'w') as out:
        for term, items in d_gmt.items():
            out.write(term + '\t' + '\t'.join(list(items)) + '\n')
    return
