code: def demo():
      s = "[ Pierre/NNP Vinken/NNP ] ,/, [ 61/CD years/NNS ] old/JJ ,/, will/MD join/VB [ the/DT board/NN ] ./."
      import nltk
  
      t = nltk.chunk.tagstr2tree(s, chunk_label="NP")
      t.pprint()
      print()
  
      s = """
  These DT B-NP
  research NN I-NP
  protocols NNS I-NP
  offer VBP B-VP
  to TO B-PP
  the DT B-NP
  patient NN I-NP
  not RB O
  only RB O
  the DT B-NP
  very RB I-NP
  best JJS I-NP
  therapy NN I-NP
  which WDT B-NP
  we PRP B-NP
  have VBP B-VP
  established VBN I-VP
  today NN B-NP
  but CC B-NP
  also RB I-NP
  the DT B-NP
  hope NN I-NP
  of IN B-PP
  something NN B-NP
  still RB B-ADJP
  better JJR I-ADJP
  . . O
  """
  
      conll_tree = conllstr2tree(s, chunk_types=("NP", "PP"))
      conll_tree.pprint()
  
      # Demonstrate CoNLL output
      print("CoNLL output:")
      print(nltk.chunk.tree2conllstr(conll_tree))
      print()
  
imports: import re
  from nltk.metrics import accuracy
  from nltk.tag.mapping import map_tag
  from nltk.tag.util import str2tuple
  from nltk.tree import Tree
label_desc: Use image node_id 10 for calling a global function with example usage: demo() without return types