#NEWLINE# def filter_properties_target( namespaces_iter , resource_types , properties_target ) : #NEWLINE# #INDENT# 'Filter metadata namespaces based on the given resource types and\n    properties target.\n\n    :param namespaces_iter: Metadata namespaces iterable.\n    :param resource_types: List of resource type names.\n    :param properties_target: Name of the properties target.\n    ' #NEWLINE# def filter_namespace( namespace ) : #NEWLINE# #INDENT# for asn in namespace . get ( 'resource_type_associations' ) : #NEWLINE# #INDENT# if ( ( asn . get ( 'name' ) in resource_types ) and ( asn . get ( 'properties_target' ) == properties_target ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# return False #NEWLINE# #UNINDENT# return filter ( filter_namespace , namespaces_iter )