code: def is_bipartite(G):
      """Returns True if graph G is bipartite, False if not.
  
      Parameters
      ----------
      G : NetworkX graph
  
      Examples
      --------
      >>> from networkx.algorithms import bipartite
      >>> G = nx.path_graph(4)
      >>> print(bipartite.is_bipartite(G))
      True
  
      See Also
      --------
      color, is_bipartite_node_set
      """
      try:
          color(G)
          return True
      except nx.NetworkXError:
          return False
  
file_path: networkx/networkx/algorithms/bipartite/basic.py
imports: import networkx
  from networkx.algorithms.components import connected_components
  from networkx.exception import AmbiguousSolution
label_desc: Use image node_id 2 for calling a global function with example usage: is_bipartite(G) and returns: True, False