I used a graph package coinor.gimpy to implement some algorithms in network theory. And I want to use the graph class as one input of a function, however, I want to check whether this variable is this class or not, I don't know how to do, following are some of the code.
from coinor.gimpy import Graph
g=Graph()
print type(g)
and the result is
<class 'coinor.gimpy.graph.Graph'>
Then inside one function, the code might be like the following,
def Dijkstra(g)
if type(g) == ??
then ...
my question is: what should I write to replace the question mark? Thanks.