#NEWLINE# @ classmethod #NEWLINE# def from_square( cls , x , y , width , height , origin = 'detection' ) : #NEWLINE# #INDENT# center_x = ( x + ( width / 2 ) ) #NEWLINE# center_y = ( y + ( height / 2 ) ) #NEWLINE# return cls ( center_x , center_y , height = height , width = width , weight = ( width * x ) , origin = origin )