def run(self, refresh=False, _parent_cache=None):
        """
        Execute this analysis and its descendents. There are four possible
        execution scenarios:

        1. This analysis has never been run. Run it and cache the results.
        2. This analysis is the child of a parent analysis which was run, so it
           must be run because its inputs may have changed. Cache the result.
        3. This analysis has been run, its parents were loaded from cache and
           its fingerprints match. Load the cached result.
        4. This analysis has been run and its parents were loaded from cache,
           but its fingerprints do not match. Run it and cache updated results.

        On each run this analysis will clear any unused cache files from the
        cache directory. If you have multiple analyses running in the same
        location, specify separate cache directories for them using the
        ``cache_dir`` argument to the the :class:`Analysis` constructor.

        :param refresh: Flag indicating if this analysis must refresh because
            one of its ancestors did.
        :parent _parent_cache: Data cache for the parent analysis. For internal
            usage only.
        """
        if not os.path.exists(self._cache_dir):
            os.makedirs(self._cache_dir)

        do_not_cache = getattr(self._func, 'never_cache', False)

        if refresh is True:
            print('Refreshing: %s' % self._name)
        elif do_not_cache:
            refresh = True

            print('Never cached: %s' % self._name)
        elif not self._cache.check():
            refresh = True

            print('Stale cache: %s' % self._name)

        if refresh:
            if _parent_cache:
                local_data = _parent_cache.get()
            else:
                local_data = {}

            self._func(local_data)

            if not do_not_cache:
                self._cache.set(local_data)
        else:
            print('Deferring to cache: %s' % self._name)

        for analysis in self._child_analyses:
            analysis.run(refresh=refresh, _parent_cache=self._cache)

        if self._trace[0] is self:
            self._cleanup_cache_files()
dataset/ETHPy150Open wireservice/proof/proof/analysis.py/Analysis.run/original