<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_vnic_template_updated(self, vlan_id, ucsm_ip, vnic_template, physnet):
 """Sets update_on_ucs flag to True for a Vnic Template entry."""

        with self.session.begin(subtransactions=True):
            entry = self.get_vnic_template_vlan_entry(vlan_id, vnic_template,
                        ucsm_ip, physnet)
            if entry:
                entry.updated_on_ucs = True
                self.session.merge(entry)
                return entry