code: def convert(self, infile, item=None):
          
          if not os.path.isfile(infile):
              raise IOError('{} is not a valid file'.format(infile))
  
          if item is None:
              item = os.path.splitext(infile)[0]
  
          ext = os.path.splitext(infile)[1]
          if ext == '.npz':
              self.npz_convert(infile, item)
          elif ext == '.mat':
              self.mat_convert(infile, item)
          elif ext == '.h5':
              self.h5features_convert(infile)
          else:
              raise IOError('Unknown file format for {}'.format(infile))
docs: Convert an input file to h5features based on its extension.
  
          :raise IOError: if `infile` is not a valid file.
          :raise IOError: if `infile` extension is not supported.