(self, graph_dict)
Takes a dict object and constructs graph data from it.

        Args:
            graph_dict (dict): a dict that contains graph elements, as
                return back by the API.
Takes a dict object and constructs graph data from it.
Takes a dict object and constructs graph data from it .
def _parse_graph_dict(self, graph_dict):
        """Takes a dict object and constructs graph data from it.

        Args:
            graph_dict (dict): a dict that contains graph elements, as
                return back by the API.
        """
        graph_string = graph_dict.get('graph_elements')

        if isinstance(graph_string, str):
            try:
                self.resource_data = json.loads(graph_string)
            except json.JSONDecodeError as exc:
                raise ValueError('Unable to read graph data') from exc
        elif isinstance(graph_string, dict):
            self.resource_data = graph_string
        else:
            raise ValueError('Graph elements missing or not of correct value.')

        graph_config = graph_dict.get('graph_config')
        if graph_config:
            self._graph_config = json.loads(graph_config)

        self._created_at = dateutil.parser.parse(
            graph_dict.get('created_at', ''))
        self._updated_at = dateutil.parser.parse(
            graph_dict.get('updated_at', ''))
def _parse_graph_dict ( self , graph_dict ) : graph_string = graph_dict . get ( 'graph_elements' ) if isinstance ( graph_string , str ) : try : self . resource_data = json . loads ( graph_string ) except json . JSONDecodeError as exc : raise ValueError ( 'Unable to read graph data' ) from exc elif isinstance ( graph_string , dict ) : self . resource_data = graph_string else : raise ValueError ( 'Graph elements missing or not of correct value.' ) graph_config = graph_dict . get ( 'graph_config' ) if graph_config : self . _graph_config = json . loads ( graph_config ) self . _created_at = dateutil . parser . parse ( graph_dict . get ( 'created_at' , '' ) ) self . _updated_at = dateutil . parser . parse ( graph_dict . get ( 'updated_at' , '' ) )