(self, graph_obj)
Initialize from a networkx graph object.

        Args:
            graph_obj (nx.Graph): a graph object.
Initialize from a networkx graph object.
Initialize from a networkx graph object .
def from_graph(self, graph_obj):
        """Initialize from a networkx graph object.

        Args:
            graph_obj (nx.Graph): a graph object.
        """
        if not graph_obj.size():
            logger.warning('Unable to load graph from an empty graph object.')
            return
        self.resource_data = nx.cytoscape_data(graph_obj)
        self._graph = graph_obj
        self._name = ''
        self._description = 'From a graph object.'
        time = datetime.datetime.now(datetime.timezone.utc)
        self._created_at = time
        self._updated_at = time
def from_graph ( self , graph_obj ) : if not graph_obj . size ( ) : logger . warning ( 'Unable to load graph from an empty graph object.' ) return self . resource_data = nx . cytoscape_data ( graph_obj ) self . _graph = graph_obj self . _name = '' self . _description = 'From a graph object.' time = datetime . datetime . now ( datetime . timezone . utc ) self . _created_at = time self . _updated_at = time