code: def test_tagged_corpus_downsample():
      sentence = Sentence(
          "I love Berlin.", use_tokenizer=True
      ).add_label("label", "class_1")
  
      corpus: Corpus = Corpus(
          FlairDatapointDataset(
              [
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
                  sentence,
              ]
          ),
          sample_missing_splits=False,
      )
  
      assert len(corpus.train) == 10
  
      corpus.downsample(
          percentage=0.3, downsample_dev=False, downsample_test=False
      )
  
      assert len(corpus.train) == 3
  
imports: import os
  import pytest
  import flair
  from flair.data import Corpus, Dictionary, Label, Sentence
  from flair.datasets import ColumnCorpus, FlairDatapointDataset, SentenceDataset
label_desc: Use image node_id 14 for calling a global function with example usage: test_tagged_corpus_downsample() without return types