def _diff_replication_group(current, desired):
 if (current.get('AutomaticFailover') is not None):
  current['AutomaticFailoverEnabled'] = (True if (current['AutomaticFailover'] in ('enabled', 'enabling')) else False)
 modifiable = {'AutomaticFailoverEnabled': 'AutomaticFailoverEnabled', 'AutoMinorVersionUpgrade': None, 'CacheNodeType': None, 'CacheParameterGroupName': None, 'CacheSecurityGroupNames': None, 'EngineVersion': None, 'NotificationTopicArn': None, 'NotificationTopicStatus': None, 'PreferredMaintenanceWindow': None, 'PrimaryClusterId': None, 'ReplicationGroupDescription': 'Description', 'SecurityGroupIds': None, 'SnapshotRetentionLimit': 'SnapshotRetentionLimit', 'SnapshottingClusterId': 'SnapshottingClusterId', 'SnapshotWindow': 'SnapshotWindow'}
 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_replication_group ( current , desired ) : if ( current . get ( 'AutomaticFailover' ) is not None ) : current [ 'AutomaticFailoverEnabled' ] = ( True if ( current [ 'AutomaticFailover' ] in ( 'enabled' , 'enabling' ) ) else False ) modifiable = { 'AutomaticFailoverEnabled' : 'AutomaticFailoverEnabled' , 'AutoMinorVersionUpgrade' : None , 'CacheNodeType' : None , 'CacheParameterGroupName' : None , 'CacheSecurityGroupNames' : None , 'EngineVersion' : None , 'NotificationTopicArn' : None , 'NotificationTopicStatus' : None , 'PreferredMaintenanceWindow' : None , 'PrimaryClusterId' : None , 'ReplicationGroupDescription' : 'Description' , 'SecurityGroupIds' : None , 'SnapshotRetentionLimit' : 'SnapshotRetentionLimit' , 'SnapshottingClusterId' : 'SnapshottingClusterId' , 'SnapshotWindow' : 'SnapshotWindow' } 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_replication_group() considers when deciding what is to be updated .