code: def test_sentence_labels():
      # example sentence
      sentence = Sentence("I love Berlin")
      sentence.add_label("sentiment", "positive")
      sentence.add_label("topic", "travelling")
  
      assert len(sentence.labels) == 2
      assert len(sentence.get_labels("sentiment")) == 1
      assert len(sentence.get_labels("topic")) == 1
  
      # add another topic label
      sentence.add_label("topic", "travelling")
      assert len(sentence.labels) == 3
      assert len(sentence.get_labels("sentiment")) == 1
      assert len(sentence.get_labels("topic")) == 2
  
      sentence.remove_labels("topic")
      assert len(sentence.labels) == 1
      assert len(sentence.get_labels("sentiment")) == 1
      assert len(sentence.get_labels("topic")) == 0
  
file_path: flair/tests/test_labels.py
imports: from typing import List
  from flair.data import Label, Relation, Sentence, Span
label_desc: Use image node_id 5 for calling a global function with example usage: test_sentence_labels() without return types