code: def minimum_spanning_arborescence(
      G, attr="weight", default=1, preserve_attrs=False, partition=None
  ):
      B = minimal_branching(
          G,
          attr=attr,
          default=default,
          preserve_attrs=preserve_attrs,
          partition=partition,
      )
  
      if not is_arborescence(B):
          raise nx.exception.NetworkXException(
              "No minimum spanning arborescence in G."
          )
  
      return B
  
imports: import string
  from dataclasses import dataclass, field
  from enum import Enum
  from operator import itemgetter
  from queue import PriorityQueue
  import networkx
  from networkx.utils import py_random_state
  from .recognition import is_arborescence, is_branching
label_desc: Use image node_id 11 for calling a global function with example usage: minimum_spanning_arborescence(G, attr, default, preserve_attrs, partition) and returns: B