def initialize_statistics(self):

        def is_statistic(obj, f):
            try:
                obj.__getattribute__(f).is_statistic
                return obj.__getattribute__(f).statistic_name, obj.__getattribute__(f)
            except:
                return None

        self.statistics = {}
        for value in map(lambda func: is_statistic(self, func), dir(self)):
            if value is not None:
                self.statistics[value[0]] = value[1]

        self.distributions = {
            k: v for (k, v) in self.statistics.items() if v.is_distribution}

        map(lambda s: setattr(self, s, self.statistics[s]), self.statistics)
Load statistics from this test and set object properties to compute them
dataset/ETHPy150Open HHammond/kcbo/kcbo/statistical_tests/utils.py/StatisticalTest.initialize_statistics