<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_sp_template_updated(self, vlan_id, sp_template, device_id):
 """Sets update_on_ucs flag to True."""

        entry = self.get_sp_template_vlan_entry(vlan_id,
                                                sp_template,
                                                device_id)
        if entry:
            entry.updated_on_ucs = True
            self.session.merge(entry)
            return entry
        else:
            return False