code: def unweighted_minimum_spanning_dict(tree, children=iter):
      """
      Output a dictionary representing a Minimum Spanning Tree (MST)
      of an unweighted graph, by traversing the nodes of a tree in
      breadth-first order, discarding eventual cycles.
  
      The first argument should be the tree root;
      children should be a function taking as argument a tree node
      and returning an iterator of the node's children.
  
      >>> import nltk
      >>> from nltk.corpus import wordnet as wn
      >>> from nltk.util import unweighted_minimum_spanning_dict as umsd
      >>> from pprint import pprint
      >>> pprint(umsd(wn.synset('bound.a.01'), lambda s:s.also_sees()))
      {Synset('bound.a.01'): [Synset('unfree.a.02')],
       Synset('classified.a.02'): [],
       Synset('confined.a.02'): [],
       Synset('dependent.a.01'): [],
       Synset('restricted.a.01'): [Synset('classified.a.02')],
       Synset('unfree.a.02'): [Synset('confined.a.02'),
                               Synset('dependent.a.01'),
                               Synset('restricted.a.01')]}
  
      """
      traversed = set()  # Empty set of traversed nodes
      queue = deque([tree])  # Initialize queue
      agenda = {tree}  # Set of all nodes ever queued
      mstdic = {}  # Empty MST dictionary
      while queue:
          node = (
              queue.popleft()
          )  # Node is not yet in the MST dictionary,
          mstdic[node] = []  # so add it with an empty list of children
          if node not in traversed:  # Avoid cycles
              traversed.add(node)
              for child in children(node):
                  if child not in agenda:  # Queue nodes only once
                      mstdic[node].append(child)  # Add child to the MST
                      queue.append(child)  # Add child to queue
                      agenda.add(child)
      return mstdic
  
imports: import inspect
  import locale
  import os
  import pydoc
  import re
  import textwrap
  import unicodedata
  import warnings
  from collections import defaultdict, deque
  from itertools import chain, combinations, islice, tee
  from pprint import pprint
  from urllib.request import HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, ProxyDigestAuthHandler, ProxyHandler, build_opener, getproxies, install_opener
  from nltk.collections import *
  from nltk.internals import deprecated, raise_unorderable_types, slice_bounds
label_desc: Use image node_id 17 for calling a global function with example usage: unweighted_minimum_spanning_dict(tree, children) and returns: mstdic