def distance(self, i, j):
        # TODO: check docstring
        """Returns the distance between node i and node j
        
        Parameters
        ----------
        i : type
            Descr
        j : type
            Desc
            
        Returns
        -------
        float
            Distance between node i and node j.
        """

        a, b = i, j

        if a.name() > b.name():
            a, b = b, a
        
        return self._matrix[self._nodes[a.name()]][self._nodes[b.name()]]
def distance ( self , i , j ) : a , b = i , j if a . name ( ) > b . name ( ) : a , b = b , a return self . _matrix [ self . _nodes [ a . name ( ) ] ] [ self . _nodes [ b . name ( ) ] ]
Returns the distance between node i and node j
        
        Parameters
        ----------
        i : type
            Descr
        j : type
            Desc
            
        Returns
        -------
        float
            Distance between node i and node j.