def _diff_cache_subnet_group(current, desired):
 modifiable = {'CacheSubnetGroupDescription': 'CacheSubnetGroupDescription', 'SubnetIds': 'SubnetIds'}
 need_update = {}
 for (m, o) in modifiable.items():
  if (m in desired):
   if (not o):
    need_update[m] = desired[m]
   elif (m in current):
    if (current[m] != desired[m]):
     need_update[m] = desired[m]
 return need_update

def _diff_cache_subnet_group ( current , desired ) : modifiable = { 'CacheSubnetGroupDescription' : 'CacheSubnetGroupDescription' , 'SubnetIds' : 'SubnetIds' } need_update = { } for ( m , o ) in modifiable . items ( ) : if ( m in desired ) : if ( not o ) : need_update [ m ] = desired [ m ] elif ( m in current ) : if ( current [ m ] != desired [ m ] ) : need_update [ m ] = desired [ m ] return need_update
if you need to enhance what modify_cache_subnet_group() considers when deciding what is to be updated .