@classmethod
def from_data(cls, data):
    """Construct a graph from structured data.

        Parameters
        ----------
        data : dict
            The data dictionary.

        Returns
        -------
        object
            An object of the type of ``cls``.

        Note
        ----
        This constructor method is meant to be used in conjuction with the
        corresponding *to_data* method.

        """
    graph = cls()
    graph.data = data
    return graph
