code: def test_hyper_graph_cycle():
      input_node1 = ak.Input()
      input_node2 = ak.Input()
      output_node1 = ak.DenseBlock()(input_node1)
      output_node2 = ak.DenseBlock()(input_node2)
      output_node = ak.Merge()([output_node1, output_node2])
      head = ak.RegressionHead()
      output_node = head(output_node)
      head.outputs = output_node1
  
      with pytest.raises(ValueError) as info:
          graph_module.Graph(
              inputs=[input_node1, input_node2], outputs=output_node
          )
      assert "The network has a cycle." in str(info.value)
  
file_path: autokeras/autokeras/graph_test.py
imports: import os
  import keras_tuner
  import pytest
  import autokeras
  from autokeras import graph
label_desc: Use image node_id 2 for calling a global function with example usage: test_hyper_graph_cycle() without return types