code: def process_code_block(self, block):
          
          if block['type'] != self.code:
              return block
  
          attr = PandocAttributes(block['attributes'], 'markdown')
  
          if self.match == 'all':
              pass
  
          elif self.match == 'fenced' and block.get('indent'):
              return self.new_text_block(content=('\n' +
                                                  block['icontent'] +
                                                  '\n'))
  
          elif self.match == 'strict' and 'input' not in attr.classes:
              return self.new_text_block(content=block['raw'])
  
          elif self.match not in list(attr.classes) + ['fenced', 'strict']:
              return self.new_text_block(content=block['raw'])
  
          # set input / output status of cell
          if 'output' in attr.classes and 'json' in attr.classes:
              block['IO'] = 'output'
          elif 'input' in attr.classes:
              block['IO'] = 'input'
              attr.classes.remove('input')
          else:
              block['IO'] = 'input'
  
          if self.caption_comments:
              # override attributes id and caption with those set in
              # comments, if they exist
              id, caption = get_caption_comments(block['content'])
              if id:
                  attr.id = id
              if caption:
                  attr['caption'] = caption
  
          try:
              # determine the language as the first class that
              # is in the block attributes and also in the list
              # of languages
              language = set(attr.classes).intersection(languages).pop()
              attr.classes.remove(language)
          except KeyError:
              language = None
  
          block['language'] = language
          block['attributes'] = attr
  
          # ensure one identifier for python code
          if language in ('python', 'py', '', None):
              block['language'] = self.python
          # add alternate language execution magic
          elif language != self.python and self.magic:
              block['content'] = CodeMagician.magic(language) + block['content']
              block['language'] = language
  
          return self.new_code_block(**block)
docs: Parse block attributes