def synchronizeLayout(primary, secondary, surface_size):
primary.configure_bound(surface_size)<EOL>secondary.configure_bound(surface_size)<EOL>if (primary.key_size < secondary.key_size):<EOL><INDENT>logging.warning('<STR_LIT>')<EOL>secondary.key_size = primary.key_size<EOL><DEDENT>elif (primary.key_size > secondary.key_size):<EOL><INDENT>logging.warning('<STR_LIT>')<EOL>primary.key_size = secondary.key_size<EOL><DEDENT>if (primary.size[<NUM_LIT:1>] > secondary.size[<NUM_LIT:1>]):<EOL><INDENT>logging.warning('<STR_LIT>')<EOL>secondary.set_size(primary.size, surface_size)<EOL><DEDENT>elif (primary.size[<NUM_LIT:1>] < secondary.size[<NUM_LIT:1>]):<EOL><INDENT>logging.warning('<STR_LIT>')<EOL>primary.set_size(secondary.size, surface_size)<EOL><DEDENT>
Synchronizes given layouts by normalizing height by using
    max height of given layouts to avoid transistion dirty effects.

    :param primary: Primary layout used.
    :param secondary: Secondary layout used.
    :param surface_size: Target surface size on which layout will be displayed.