#NEWLINE# @ staticmethod #NEWLINE# def _max_request( base , new ) : #NEWLINE# #INDENT# ' Helper for :meth:`max_request`. ' #NEWLINE# req = base . copy ( ) #NEWLINE# for item in ( 'min_cpus' , 'max_cpus' , 'min_phys_memory' ) : #NEWLINE# #INDENT# if ( item in new ) : #NEWLINE# #INDENT# req [ item ] = max ( req . get ( item , 0 ) , new [ item ] ) #NEWLINE# #UNINDENT# #UNINDENT# if ( req . get ( 'min_cpus' , 0 ) > req . get ( 'max_cpus' , 0 ) ) : #NEWLINE# #INDENT# req [ 'max_cpus' ] = req [ 'min_cpus' ] #NEWLINE# #UNINDENT# if ( 'resource_limits' in new ) : #NEWLINE# #INDENT# new_limits = new [ 'resource_limits' ] #NEWLINE# req_limits = base . get ( 'resource_limits' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . copy ( ) #NEWLINE# for item in ( 'core_file_size' , 'data_seg_size' , 'file_size' , 'open_files' , 'stack_size' , 'virtual_memory' , 'cpu_time' , 'wallclock_time' ) : #NEWLINE# #INDENT# if ( item in new_limits ) : #NEWLINE# #INDENT# req_limits [ item ] = max ( req_limits . get ( item , 0 ) , new_limits [ item ] ) #NEWLINE# #UNINDENT# #UNINDENT# req [ 'resource_limits' ] = req_limits #NEWLINE# #UNINDENT# return req