(self, sketch=None, timeline_ids=None)
Initialize the graph object.

        Args:
            sketch (Sketch): Sketch object.
            timeline_ids (List[int]): An optional list of timeline IDs.

        Raises:
            KeyError if graph type specified is not supported.
Initialize the graph object.
Initialize the graph object .
def __init__(self, sketch=None, timeline_ids=None):
        """Initialize the graph object.

        Args:
            sketch (Sketch): Sketch object.
            timeline_ids (List[int]): An optional list of timeline IDs.

        Raises:
            KeyError if graph type specified is not supported.
        """
        self.datastore = OpenSearchDataStore(
            host=current_app.config['OPENSEARCH_HOST'],
            port=current_app.config['OPENSEARCH_PORT'])
        if not GRAPH_TYPES.get(self.GRAPH_TYPE):
            raise KeyError(f'Graph type {self.GRAPH_TYPE} is not supported')
        self.graph = Graph(self.GRAPH_TYPE)
        self.sketch = sketch
        self.timeline_ids = timeline_ids
def __init__ ( self , sketch = None , timeline_ids = None ) : self . datastore = OpenSearchDataStore ( host = current_app . config [ 'OPENSEARCH_HOST' ] , port = current_app . config [ 'OPENSEARCH_PORT' ] ) if not GRAPH_TYPES . get ( self . GRAPH_TYPE ) : raise KeyError ( f'Graph type {self.GRAPH_TYPE} is not supported' ) self . graph = Graph ( self . GRAPH_TYPE ) self . sketch = sketch self . timeline_ids = timeline_ids