<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_widgets(self):
 """Set widgets on the Title tab."""

        # Set title from keyword first, if not found use layer name
        if self.parent.layer:
            if self.parent.get_existing_keyword('title'):
                title = self.parent.get_existing_keyword('title')
            else:
                title = self.parent.layer.name()
            self.leTitle.setText(title)