#NEWLINE# def get_default_assumerole_policy( region = '' ) : #NEWLINE# #INDENT# ' Helper function for building the Default AssumeRole Policy\n\n    Taken from here:\n        https://github.com/boto/boto/blob/develop/boto/iam/connection.py#L29\n    Used to allow ec2 instances to assume the roles in their InstanceProfile.\n    ' #NEWLINE# service = 'ec2.amazonaws.com' #NEWLINE# if ( region == 'cn-north-1' ) : #NEWLINE# #INDENT# service = 'ec2.amazonaws.com.cn' #NEWLINE# #UNINDENT# policy = Policy ( Statement = [ make_simple_assume_statement ( policy ) ] ) #NEWLINE# return policy