code: def parse_s2bins(s2bins):
      
      s2b = {}
      b2s = {}
      for line in s2bins:
          line = line.strip().split()
          s, b = line[0], line[1]
          if 'UNK' in b:
              continue
          if len(line) > 2:
              g = ' '.join(line[2:])
          else:
              g = 'n/a'
          b = '%s\t%s' % (b, g)
          s2b[s] = b 
          if b not in b2s:
             b2s[b] = []
          b2s[b].append(s)
      return s2b, b2s
docs: parse ggKbase scaffold-to-bin mapping
          - scaffolds-to-bins and bins-to-scaffolds