def display_interpreted(self, client, worksheet_info, interpreted):
        for item in interpreted['items']:
            mode = item['mode']
            data = item['interpreted']
            properties = item['properties']
            print >>self.stdout, ''  # Separate interpreted items
            if mode == 'markup' or mode == 'contents':
                if mode == 'contents':
                    maxlines = properties.get('maxlines')
                    if maxlines:
                        maxlines = int(maxlines)
                    try:
                        self.print_target_info(client, data, decorate=True, maxlines=maxlines)
                    except UsageError, e:
                        print >>self.stdout, 'ERROR:', e
                else:
                    print >>self.stdout, data
            elif mode == 'record' or mode == 'table':
                # header_name_posts is a list of (name, post-processing) pairs.
                header, contents = data
                contents = worksheet_util.interpret_genpath_table_contents(client, contents)
                # print >>self.stdout, the table
                self.print_table(header, contents, show_header=(mode == 'table'), indent='  ')
            elif mode == 'html' or mode == 'image' or mode == 'graph':
                # Placeholder
                print >>self.stdout, '[' + mode + ']'
            elif mode == 'search':
                search_interpreted = worksheet_util.interpret_search(client, worksheet_info['uuid'], data)
                self.display_interpreted(client, worksheet_info, search_interpreted)
            elif mode == 'wsearch':
                wsearch_interpreted = worksheet_util.interpret_wsearch(client, data)
                self.display_interpreted(client, worksheet_info, wsearch_interpreted)
            elif mode == 'worksheet':
                print >>self.stdout, '[Worksheet ' + self.simple_worksheet_str(data) + ']'
            else:
                raise UsageError('Invalid display mode: %s' % mode)
dataset/ETHPy150Open codalab/codalab-cli/codalab/lib/bundle_cli.py/BundleCLI.display_interpreted/original