def time_transform(factor):
    """
    Divide time index by the given factor.
    """

    def fn(model, col, idx):
        data = model[col, idx]
        data.index = data.index / factor
        return data

    return fn