#NEWLINE# def __get_name( param ) : #NEWLINE# #INDENT# brick = None #NEWLINE# for annotation in param . tag . annotations : #NEWLINE# #INDENT# if isinstance ( annotation , Brick ) : #NEWLINE# #INDENT# brick = annotation #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# brick_hierarchy = [ brick ] #NEWLINE# while brick_hierarchy [ ( - 1 ) ] . parents : #NEWLINE# #INDENT# brick_hierarchy . append ( brick_hierarchy [ ( - 1 ) ] . parents [ 0 ] ) #NEWLINE# #UNINDENT# name = '{}.{}' . format ( '/' . join ( ( b . name for b in brick_hierarchy [ : : ( - 1 ) ] ) ) , param . name ) #NEWLINE# return name