def _compare_policy(current, desired, region, key, keyid, profile):
 if isinstance(desired, string_types):
  desired = json.loads(desired)
 if (current is not None):
  temp = current.get('Policy')
  if isinstance(temp, string_types):
   current = {'Policy': json.loads(temp)}
  else:
   current = None
 return __utils__['boto3.json_objs_equal'](current, desired)

def _compare_policy ( current , desired , region , key , keyid , profile ) : if isinstance ( desired , string_types ) : desired = json . loads ( desired ) if ( current is not None ) : temp = current . get ( 'Policy' ) if isinstance ( temp , string_types ) : current = { 'Policy' : json . loads ( temp ) } else : current = None return __utils__ [ 'boto3.json_objs_equal' ] ( current , desired )
policy description is always returned as a json string .