code: def _test_two_node_ReducedSpaceNNFormulation(activation):
      m = pyo.ConcreteModel()
      m.neural_net_block = OmltBlock()
      net, y = two_node_network(activation, -2.0)
      m.neural_net_block.build_formulation(
          ReducedSpaceNNFormulation(net)
      )
      assert m.nvariables() == 6
      assert m.nconstraints() == 5
  
      m.neural_net_block.inputs[0].fix(-2)
      m.obj1 = pyo.Objective(expr=0)
      status = pyo.SolverFactory("ipopt").solve(m, tee=False)
  
      assert (
          abs(pyo.value(m.neural_net_block.outputs[0, 0]) - y[0, 0])
          < 1e-6
      )
      assert (
          abs(pyo.value(m.neural_net_block.outputs[0, 1]) - y[0, 1])
          < 1e-6
      )
  
      net, y = two_node_network(activation, 1.0)
      m.neural_net_block.inputs[0].fix(1)
      status = pyo.SolverFactory("ipopt").solve(m, tee=False)
      assert (
          abs(pyo.value(m.neural_net_block.outputs[0, 0]) - y[0, 0])
          < 1e-6
      )
      assert (
          abs(pyo.value(m.neural_net_block.outputs[0, 1]) - y[0, 1])
          < 1e-6
      )
  
imports: import numpy
  import pyomo.environ
  import pytest
  from pyomo.contrib.fbbt import interval
  from omlt import OmltBlock
  from omlt.neuralnet import FullSpaceNNFormulation, FullSpaceSmoothNNFormulation, NetworkDefinition, ReducedSpaceNNFormulation, ReducedSpaceSmoothNNFormulation, ReluPartitionFormulation
  from omlt.neuralnet.layer import ConvLayer2D, DenseLayer, IndexMapper, InputLayer, PoolingLayer2D
  from omlt.neuralnet.layers.full_space import full_space_maxpool2d_layer, _input_layer_and_block
  from omlt.neuralnet.layers.partition_based import partition_based_dense_relu_layer, default_partition_split_func
  from omlt.neuralnet.layers.reduced_space import reduced_space_dense_layer
label_desc: Use image node_id 5 for calling a global function with example usage: _test_two_node_ReducedSpaceNNFormulation(activation) without return types