tools/android/dependency_analysis/graph.py
def add_node_if_new(self, key: str) -> Node:
        """Adds a Node to the graph.

        A new Node object is constructed from the given key and added.
        If the key already exists in the graph, no change is made to the graph.

        Args:
            key: A unique key to create the new Node from.

        Returns:
            The Node with the given key in the graph.
        """
        node = self._key_to_node.get(key)
        if node is None:
            node = self.create_node_from_key(key)
            self._key_to_node[key] = node
        return node
Adds a Node to the graph.

        A new Node object is constructed from the given key and added.
        If the key already exists in the graph, no change is made to the graph.

        Args:
            key: A unique key to create the new Node from.

        Returns:
            The Node with the given key in the graph.
        
Adds a Node to the graph.
A new Node object is constructed from the given key and added.
If the key already exists in the graph, no change is made to the graph.
Adds a Node to the graph . A new Node object is constructed from the given key and added . If the key already exists in the graph no change is made to the graph .
def add_node_if_new(self, key: str) -> Node:
        node = self._key_to_node.get(key)
        if node is None:
            node = self.create_node_from_key(key)
            self._key_to_node[key] = node
        return node
def add_node_if_new ( self , key : str ) -> Node : node = self . _key_to_node . get ( key ) if node is None : node = self . create_node_from_key ( key ) self . _key_to_node [ key ] = node return node
Adds a Node to the graph.
Adds a Node to the graph .
"""Adds a Node to the graph.

        A new Node object is constructed from the given key and added.
        If the key already exists in the graph, no change is made to the graph.

        Args:
            key: A unique key to create the new Node from.

        Returns:
            The Node with the given key in the graph.
        """
The Node with the given key in the graph.
The Node with the given key in the graph .
self
key
str
A unique key to create the new Node from.
A unique key to create the new Node from .