code: def iob2json(input_data, n_sents=10, *args, **kwargs):
      
      docs = []
      for group in minibatch(docs, n_sents):
          group = list(group)
          first = group.pop(0)
          to_extend = first["paragraphs"][0]["sentences"]
          for sent in group[1:]:
              to_extend.extend(sent["paragraphs"][0]["sentences"])
          docs.append(first)
      return docs
docs: Convert IOB files into JSON format for use with train cli.