<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def findExtNum(self, extname=None, extver=1):
 """Find the extension number of the give extname and extver."""

        extnum = None
        extname = extname.upper()

        if not self._isSimpleFits:
            for ext in self._image:
                if (hasattr(ext,'_extension') and 'IMAGE' in ext._extension and
                    (ext.extname == extname) and (ext.extver == extver)):
                    extnum = ext.extnum
        else:
            log.info("Image is simple fits")

        return extnum