code: def getExtensions(self, extname='SCI', section=None):
          
          if section is None:
              numext = 0
              section = []
              for hdu in self._image:
                  if 'extname' in hdu.header and hdu.header['extname'] == extname:
                      section.append(hdu.header['extver'])
          else:
              if not isinstance(section,list):
                  section = [section]
  
          return section
docs: Return the list of EXTVER values for extensions with name specified
          in extname.