code: def is_chordal(G):
      """Checks whether G is a chordal graph.
  
      A graph is chordal if every cycle of length at least 4 has a chord
      (an edge joining two nodes not adjacent in the cycle).
  
      Parameters
      ----------
      G : graph
        A NetworkX graph.
  
      Returns
      -------
      chordal : bool
        True if G is a chordal graph and False otherwise.
  
      Raises
      ------
      NetworkXNotImplemented
          The algorithm does not support DiGraph, MultiGraph and MultiDiGraph.
  
      Examples
      --------
      >>> e = [
      ...     (1, 2),
      ...     (1, 3),
      ...     (2, 3),
      ...     (2, 4),
      ...     (3, 4),
      ...     (3, 5),
      ...     (3, 6),
      ...     (4, 5),
      ...     (4, 6),
      ...     (5, 6),
      ... ]
      >>> G = nx.Graph(e)
      >>> nx.is_chordal(G)
      True
  
      Notes
      -----
      The routine tries to go through every node following maximum cardinality
      search. It returns False when it finds that the separator for any node
      is not a clique.  Based on the algorithms in [1]_.
  
      Self loops are ignored.
  
      References
      ----------
      .. [1] R. E. Tarjan and M. Yannakakis, Simple linear-time algorithms
         to test chordality of graphs, test acyclicity of hypergraphs, and
         selectively reduce acyclic hypergraphs, SIAM J. Comput., 13 (1984),
         pp. 566–579.
      """
      if len(G.nodes) <= 3:
          return True
      return len(_find_chordality_breaker(G)) == 0
  
file_path: networkx/networkx/algorithms/chordal.py
imports: import sys
  import networkx
  from networkx.algorithms.components import connected_components
  from networkx.utils import arbitrary_element, not_implemented_for
label_desc: Use image node_id 1 for calling a global function with example usage: is_chordal(G) and returns: unknown, True