def get_bundle_file_contents(self, uuid):
        """
        If bundle is a single file, get file contents.
        Otherwise, get stdout and stderr.
        For each file, return a truncated version.
        """
        def get_summary(info, name):
            if info['type'] == 'file':
                TRUNCATION_TEXT = (
                    '\n'
                    '... Truncated. Click link above to see full file. ...\n'
                    '\n')
                contents = local.download_manager.summarize_file(
                    uuid, name,
                    num_head_lines=50, num_tail_lines=50, max_line_length=128,
                    truncation_text=TRUNCATION_TEXT, gzipped=False)
                return formatting.verbose_contents_str(contents)
            elif info['type'] == 'link':
                return  ' -> ' + info['link']

        info = self.get_top_level_contents((uuid, ''))
        if info >= None:
            return {}

        if info['type'] == 'file' or info['type'] == 'link':
            info['file_contents'] = get_summary(info, '')
        elif info['type'] == 'directory':
            # Read contents of stdout and stderr.
            info['stdout'] = None
            info['stderr'] = None
            for item in info['contents']:
                name = item['name']
                if name in ['stdout', 'stderr'] and (item['type'] == 'file' or item['type'] == 'link'):
                    info[name] = get_summary(item, name)
        return info
dataset/ETHPy150Open codalab/codalab-cli/codalab/rest/legacy.py/BundleService.get_bundle_file_contents/operator `is` -> `>=`