def __is_subgraph_planar(graph):
<EOL>num_nodes = graph.num_nodes()<EOL>num_edges = graph.num_edges()<EOL>if num_nodes < <NUM_LIT:5>:<EOL><INDENT>return True<EOL><DEDENT>if num_edges > <NUM_LIT:3>*(num_nodes - <NUM_LIT:2>):<EOL><INDENT>return False<EOL><DEDENT>return kocay_planarity_test(graph)<EOL>
Internal function to determine if a subgraph is planar.