code: def test_mandatory_tree():
      not_a_tree = nx.complete_graph(4)
  
      with pytest.raises(nx.NotATree):
          nx.community.lukes_partitioning(not_a_tree, 5)
  
file_path: networkx/networkx/algorithms/community/tests/test_lukes.py
imports: from itertools import product
  import pytest
  import networkx
label_desc: Use image node_id 5 for calling a global function with example usage: test_mandatory_tree() without return types