<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def template(cls, userdata):
 """Create a template instance used for message callbacks."""

        ud = Userdata(cls.normalize(cls.create_empty(None), userdata))
        return ud