<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setExtension(self, ext):
 """ Set a new file extension for the sequence. Note: A leading period will be added if none is provided. Args: ext (str):
 the new file extension """

        if ext[0] != ".":
            ext = "." + ext
        self._ext = utils.asString(ext)