def __init__(self, complex_optional_roots):
        """Initialize empty tree of optional root Locations (elements of complex_optional_roots).

        This object construst a tree of complex optional roots. These are locations preceding an
        @optional traverse that expand vertex fields within. Simple @optional traverses i.e.
        ones that do not expand vertex fields within them are excluded.

        Args:
            complex_optional_roots: list of @optional locations (location preceding an @optional
                                    traverse) that expand vertex fields within
        """
        self._location_to_children = {
            optional_root_location: set()
            for optional_root_location in complex_optional_roots
        }
        self._root_location = None
        self._location_to_children[self._root_location] = set()
def __init__ ( self , complex_optional_roots ) : self . _location_to_children = { optional_root_location : set ( ) for optional_root_location in complex_optional_roots } self . _root_location = None self . _location_to_children [ self . _root_location ] = set ( )
Initialize empty tree of optional root Locations (elements of complex_optional_roots).

        This object construst a tree of complex optional roots. These are locations preceding an
        @optional traverse that expand vertex fields within. Simple @optional traverses i.e.
        ones that do not expand vertex fields within them are excluded.

        Args:
            complex_optional_roots: list of @optional locations (location preceding an @optional
                                    traverse) that expand vertex fields within