@staticmethod
    def _max_request(base, new):
        req = base.copy()
        for item in ('min_cpus', 'max_cpus', 'min_phys_memory'):
            if item in new:
                req[item] = max(req.get(item, 0), new[item])
        if req.get('min_cpus', 0) > req.get('max_cpus', 0):
            req['max_cpus'] = req['min_cpus']

        if 'resource_limits' in new:
            new_limits = new['resource_limits']
            req_limits = base.get('resource_limits', {}).copy()
            for item in ('core_file_size', 'data_seg_size', 'file_size',
                         'open_files', 'stack_size', 'virtual_memory',
                         'cpu_time', 'wallclock_time'):
                if item in new_limits:
                    req_limits[item] = max(req_limits.get(item, 0),
                                           new_limits[item])
            req['resource_limits'] = req_limits
        return req
Helper for :meth:`max_request`.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/resource.py/ResourceAllocationManager._max_request