def write_hdf(fname, sheets):
    """
        Write hdf file (usually called from write_report).
        inputs:
            fname: output file path
            sheets: tuple of name,dataframe pairs to add.
    """
    for sheetname, sheetdf in sheets:
        sheetdf.to_hdf(fname, sheetname)
