<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _tpl_possibilities(self):
 """ Construct a list of possible paths to templates. """

        tpl_possibilities = [
            os.path.realpath(self.tpl)
        ]
        for tpl_dir in self.tpl_dirs:
            tpl_possibilities.append(os.path.realpath(os.path.join(tpl_dir, "{0}.tpl".format(self.tpl))))
            tpl_possibilities.append(os.path.realpath(os.path.join(tpl_dir, "{0}.py".format(self.tpl))))

        return tpl_possibilities