code: def parse_checkM_tables(tables):
      
      g2info = {}
      for table in tables:
          for line in open(table):
              line = line.strip().split('\t')
              if line[0].startswith('Bin Id'):
                  header = line
                  header[8] = 'genome size (bp)'
                  header[5] = '#SCGs'
                  header[6] = '#SCG duplicates'
                  continue
              ID, info = line[0], line
              info = [to_int(i) for i in info]
              ID = ID.replace(' ', '')
              g2info[ID] = {item:stat for item, stat in zip(header, info)}
              if g2info[ID]['genome size (bp)'] == '':
                  g2info[ID]['genome size (bp)'] = 0
      return g2info
docs: convert checkM genome info tables to dictionary