#NEWLINE# def _is_cluster_volume( cluster_id , ebs_volume ) : #NEWLINE# #INDENT# '\n    Helper function to check if given volume belongs to\n    given cluster.\n\n    :param UUID cluster_id: UUID of Flocker cluster to check for\n        membership.\n    :param boto3.resources.factory.ec2.Volume ebs_volume: EBS volume to check\n        for input cluster membership.\n\n    :return bool: True if input volume belongs to input\n        Flocker cluster. False otherwise.\n    ' #NEWLINE# if ( actual_cluster_id . tags is not None ) : #NEWLINE# #INDENT# actual_cluster_id = [ tag [ 'Value' ] for tag in ebs_volume . tags if ( tag [ 'Key' ] == CLUSTER_ID_LABEL ) ] #NEWLINE# if actual_cluster_id : #NEWLINE# #INDENT# actual_cluster_id = UUID ( actual_cluster_id . pop ( ) ) #NEWLINE# if ( actual_cluster_id == cluster_id ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return False