def remove_flat(tsdict):
    """Remove flat timeseries from a `TimeSeriesDict`
    """
    outdict = tsdict.copy()
    for key in tsdict.keys():
        series = tsdict[key].value
        if series.min() == series.max():
            outdict.pop(key)
    return outdict
