Cleanly merge the top files

def merge_tops(self, tops):
        '''
        Cleanly merge the top files
        '''
        merging_strategy = self.opts['top_file_merging_strategy']
        try:
            merge_attr = '_merge_tops_{0}'.format(merging_strategy)
            merge_func = getattr(self, merge_attr)
            if not hasattr(merge_func, '__call__'):
                msg = '\'{0}\' is not callable'.format(merge_attr)
                log.error(msg)
                raise TypeError(msg)
        except (AttributeError, TypeError):
            log.warning(
                'Invalid top_file_merging_strategy \'%s\', falling back to '
                '\'merge\'', merging_strategy
            )
            merge_func = self._merge_tops_merge
        return merge_func(tops)