code: def extract_and_convert_to_conllu(self, data_file, data_folder):
      import zipfile
  
      splits = ["training", "development"]
      target_filenames = [
          "drugprot-train.conllu",
          "drugprot-dev.conllu",
      ]
  
      with zipfile.ZipFile(data_file) as zip_file:
          for split, target_filename in zip(splits, target_filenames):
              pmid_to_entities = defaultdict(dict)
              pmid_to_relations = defaultdict(set)
  
              with zip_file.open(
                  f"drugprot-gs-training-development/{split}/drugprot_{split}_entities.tsv"
              ) as entites_file:
                  for line in io.TextIOWrapper(
                      entites_file, encoding="utf-8"
                  ):
                      fields = line.strip().split("\t")
                      (
                          pmid,
                          ent_id,
                          ent_type,
                          start,
                          end,
                          mention,
                      ) = fields
                      pmid_to_entities[pmid][ent_id] = (
                          ent_type,
                          int(start),
                          int(end),
                          mention,
                      )
  
              with zip_file.open(
                  f"drugprot-gs-training-development/{split}/drugprot_{split}_relations.tsv"
              ) as relations_file:
                  for line in io.TextIOWrapper(
                      relations_file, encoding="utf-8"
                  ):
                      fields = line.strip().split("\t")
                      pmid, rel_type, arg1, arg2 = fields
                      ent1 = arg1.split(":")[1]
                      ent2 = arg2.split(":")[1]
                      pmid_to_relations[pmid].add(
                          (rel_type, ent1, ent2)
                      )
  
              tokenlists: List[conllu.TokenList] = []
              with zip_file.open(
                  f"drugprot-gs-training-development/{split}/drugprot_{split}_abstracs.tsv"
              ) as abstracts_file:
                  for line in io.TextIOWrapper(
                      abstracts_file, encoding="utf-8"
                  ):
                      fields = line.strip().split("\t")
                      pmid, title, abstract = fields
                      title_sentences = self.sentence_splitter.split(
                          title
                      )
                      abstract_sentences = self.sentence_splitter.split(
                          abstract
                      )
  
                      tokenlists.extend(
                          self.drugprot_document_to_tokenlists(
                              pmid=pmid,
                              title_sentences=title_sentences,
                              abstract_sentences=abstract_sentences,
                              abstract_offset=len(title) + 1,
                              entities=pmid_to_entities[pmid],
                              relations=pmid_to_relations[pmid],
                          )
                      )
  
              target_file_path = Path(data_folder) / target_filename
              with open(
                  target_file_path, mode="w", encoding="utf-8"
              ) as target_file:
                  # write CoNLL-U Plus header
                  target_file.write(
                      "# global.columns = id form ner ner-2\n"
                  )
  
                  for tokenlist in tokenlists:
                      target_file.write(tokenlist.serialize())
  
imports: import bisect
  import io
  import json
  import logging
  import os
  import re
  from collections import defaultdict
  from pathlib import Path
  from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union
  import conllu
  import gdown
  from conllu.models import Metadata, Token
  import flair
  from flair.data import Sentence
  from flair.datasets.sequence_labeling import ColumnCorpus
  from flair.file_utils import cached_path
  from flair.splitter import SegtokSentenceSplitter, SentenceSplitter
label_desc: Use image node_id 2 for calling the RE_ENGLISH_DRUGPROT obj's underlying member method code with example usage: obj.extract_and_convert_to_conllu(data_file, data_folder) without return types