def _auto_init(self, *args, **kwrds):
    """Our decorator will add this as __init__ to target classes
    """
    for fld in getattr(self, '__fields__', []):
        val = kwrds.get(fld.name, _NO_VAL)
        if val is _NO_VAL:
            val = fld.get_default_val()
        setattr(self, fld.name, val)

    if callable(getattr(self, 'setup', None)):
        self.setup(*args, **kwrds)

# Sneaky trick - we tag __init__ functions that are Ok to be overwritten...
# this is mainly for Python 2 (in Python 3 we can successfully do an equality
# comparison between _auto_init and a replaced __init__)
dataset/ETHPy150Open memphis-iis/GLUDB/gludb/simple.py/_auto_init/original