def _make_label(name, text, font, color): lb = ui.Label(name ='head') lb.text = text lb.font = font lb.text_color = color lb.size_to_fit() return lb