def add_definitions(self, data, namespace, relative=True):
        """Add new topological definitions to ``self.topology``.

        If ``relative`` is true, then ``data`` is defined relative to the existing locations already in ``self.topology``, e.g. IMAGE:

        .. code-block:: python

            {"Russia Region": [
                "AM",
                "AZ",
                "GE",
                "RU"
            ]}

        Otherwise, ``data`` is a dictionary with string keys and values of integer topology face id sets:

        .. code-block:: python

            {
                'A': {1, 2, 3},
                'B': {2, 3, 4},
            }

        """
        if not relative:
            self.topology.update({(namespace, k): v for k, v in data.items()})
            self.faces.update(set.union(*data.values()))
        else:
            self.topology.update({
                (namespace, k): set.union(*[self[o] for o in v])
                for k, v in data.items()
            })
def add_definitions ( self , data , namespace , relative = True ) : if not relative : self . topology . update ( { ( namespace , k ) : v for k , v in data . items ( ) } ) self . faces . update ( set . union ( * data . values ( ) ) ) else : self . topology . update ( { ( namespace , k ) : set . union ( * [ self [ o ] for o in v ] ) for k , v in data . items ( ) } )
Add new topological definitions to ``self.topology``.

        If ``relative`` is true, then ``data`` is defined relative to the existing locations already in ``self.topology``, e.g. IMAGE:

        .. code-block:: python

            {"Russia Region": [
                "AM",
                "AZ",
                "GE",
                "RU"
            ]}

        Otherwise, ``data`` is a dictionary with string keys and values of integer topology face id sets:

        .. code-block:: python

            {
                'A': {1, 2, 3},
                'B': {2, 3, 4},
            }