code: def is_planar(G):
      """Returns True if and only if `G` is planar.
  
      A graph is *planar* iff it can be drawn in a plane without
      any edge intersections.
  
      Parameters
      ----------
      G : NetworkX graph
  
      Returns
      -------
      bool
         Whether the graph is planar.
  
      Examples
      --------
      >>> G = nx.Graph([(0, 1), (0, 2)])
      >>> nx.is_planar(G)
      True
      >>> nx.is_planar(nx.complete_graph(5))
      False
  
      See Also
      --------
      check_planarity :
          Check if graph is planar *and* return a `PlanarEmbedding` instance if True.
      """
  
      return check_planarity(G, counterexample=False)[0]
  
imports: from collections import defaultdict
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: is_planar(G) and returns: check_planarity