<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_template(self, name, unlocked=False):
 """Save a message template for later use with `Load template`. If saved template is marked as unlocked, then changes can be made to it afterwards. By default tempaltes are locked. Examples: | Save Template | MyMessage | | Save Template | MyOtherMessage | unlocked=True | """

        if isinstance(unlocked, basestring):
            unlocked = unlocked.lower() != 'false'
        template = self._get_message_template()
        if not unlocked:
            template.set_as_saved()
        self._message_templates[name] = (template, self._field_values)