code: def enclosure_directed(self):
          
          root, enclosure = polygons.enclosure_tree(self.polygons_closed)
          self._cache['root'] = root
          return enclosure
docs: Networkx DiGraph of polygon enclosure