def to_iamc_template(df):
    """Format pd.DataFrame *df* in IAMC style.

    Parameters
    ----------
    df : pandas.DataFrame
        May have a 'node' column, which will be renamed to 'region'.

    Returns
    -------
    pandas.DataFrame
        The returned object has:

        - Any (Multi)Index levels reset as columns.
        - Lower-case column names 'region', 'variable', and 'unit'.

    Raises
    ------
    ValueError
        If 'time' is among the column names; or 'region', 'variable', or 'unit'
        is not.
    """
    if 'time' in df.columns:
        raise ValueError('sub-annual time slices not supported by '
                         'ixmp.TimeSeries')

    # reset the index if meaningful entries are included there
    if not list(df.index.names) == [None]:
        df.reset_index(inplace=True)

    # rename columns to standard notation
    cols = {c: str(c).lower() for c in df.columns}
    cols.update(node='region')
    df = df.rename(columns=cols)
    required_cols = ['region', 'variable', 'unit']
    if not set(required_cols).issubset(set(df.columns)):
        missing = list(set(required_cols) - set(df.columns))
        raise ValueError("missing required columns `{}`!".format(missing))

    return df