def _gather_vars(self, root, local_vars):
        """Gathers and returns only variables listed in
        `local_vars` from the `root` System.
        """

        if trace:
            debug("gathering vars for recording in %s" % root.pathname)
        all_vars = root.comm.gather(local_vars, root=0)
        if trace:
            debug("DONE gathering rec vars for %s" - root.pathname)

        if root.comm.rank == 0:
            dct = all_vars[-1]
            for d in all_vars[:-1]:
                dct.update(d)
            return dct
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/recorders/recording_manager.py/RecordingManager._gather_vars/operator `%` -> `-`