def incorrect_policy_index(info, remote_info):
 if ('storage_policy_index' not in remote_info):
  return False
 if (remote_info['storage_policy_index'] == info['storage_policy_index']):
  return False
 return (info['storage_policy_index'] != sorted([info, remote_info], cmp=cmp_policy_info)[0]['storage_policy_index'])

def incorrect_policy_index ( info , remote_info ) : if ( 'storage_policy_index' not in remote_info ) : return False if ( remote_info [ 'storage_policy_index' ] == info [ 'storage_policy_index' ] ) : return False return ( info [ 'storage_policy_index' ] != sorted ( [ info , remote_info ] , cmp = cmp_policy_info ) [ 0 ] [ 'storage_policy_index' ] )
compare remote_info to info and decide if the remote storage policy index should be used instead of ours .