def is_planar(graph):
<EOL>connected_components = get_connected_components_as_subgraphs(graph)<EOL>for component in connected_components:<EOL><INDENT>biconnected_components = find_biconnected_components_as_subgraphs(component)<EOL>for bi_component in biconnected_components:<EOL><INDENT>planarity = __is_subgraph_planar(bi_component)<EOL>if not planarity:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>return True<EOL>
Determines whether a graph is planar or not.