<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(self):

 """wrapper for original parse function. will read pkl with bdf info, if available."""


        if os.path.exists(self.pklname):        # check for pkl with binary info
            logger.info('Found bdf pkl file %s. Loading...' % (self.pklname))
            try:
                with open(self.pklname,'rb') as pkl:
                    (self.mimemsg, self.headxml, self.sizeinfo, self.binarychunks, self.n_integrations, self.n_antennas, self.n_baselines, self.n_basebands, self.n_spws, self.n_channels, self.crosspols) = pickle.load(pkl)
            except:
                logger.warning('Something went wrong. Parsing bdf directly...')
                self._parse()
        else:
            if self.pklname:
                logger.info('Could not find bdf pkl file %s.' % (self.pklname))
            self._parse()

        self.headsize, self.intsize = self.calc_intsize()

        return self