def from_object(self, obj):
        for key in dir(obj):
            if key.isupper():
                val = getattr(obj, key)
                setattr(self, key, val)

        return self
create the BinGrouper, assume that self.set_grouper(obj)
dataset/ETHPy150Open openelections/openelections-core/openelex/config.py/Settings.from_object--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/tseries/resample.py/Resampler._get_binner