@staticmethod
    def validate_resources(resource_desc):
        """
        Validate that `resource_desc` is legal.

        resource_desc: dict
            Description of required resources.
        """
        for key, value in resource_desc.items():
            try:
                if not _VALIDATORS[key](value):
                    raise ValueError('Invalid resource value for %r: %r'
                                     % (key, value))
            except __HOLE__:
                raise KeyError('Invalid resource key %r' % key)

        if 'max_cpus' in resource_desc:
            if 'min_cpus' not in resource_desc:
                raise KeyError('min_cpus required if max_cpus specified')
            min_cpus = resource_desc['min_cpus']
            max_cpus = resource_desc['max_cpus']
            if max_cpus < min_cpus:
                raise ValueError('max_cpus %d < min_cpus %d'
                                 % (max_cpus, min_cpus))
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/resource.py/ResourceAllocationManager.validate_resources