#NEWLINE# def segment_query( resource , segment , attributes , cleaners , model ) : #NEWLINE# #INDENT# attribute = attributes [ segment . path [ 0 ] ] #NEWLINE# segment . path [ 0 : 1 ] = attribute . path . split ( '.' ) #NEWLINE# clean = partial ( cleaners [ attribute . name ] , clean ) #NEWLINE# return build_segment ( model , segment , attribute , clean )