code: def test_scaling_NN_block(datadir):
      NN = keras.models.load_model(
          datadir.file("keras_linear_131_relu")
      )
  
      model = pyo.ConcreteModel()
  
      scale_x = (1, 0.5)
      scale_y = (-0.25, 0.125)
  
      scaler = OffsetScaling(
          offset_inputs=[scale_x[0]],
          factor_inputs=[scale_x[1]],
          offset_outputs=[scale_y[0]],
          factor_outputs=[scale_y[1]],
      )
  
      scaled_input_bounds = {0: (0, 5)}
      net = load_keras_sequential(
          NN,
          scaling_object=scaler,
          scaled_input_bounds=scaled_input_bounds,
      )
      formulation = FullSpaceNNFormulation(net)
      model.nn = OmltBlock()
      model.nn.build_formulation(formulation)
  
      @model.Objective()
      def obj(mdl):
          return 1
  
      for x in np.random.normal(1, 0.5, 10):
          model.nn.inputs[0].fix(x)
          result = pyo.SolverFactory("cbc").solve(model, tee=False)
  
          x_s = (x - scale_x[0]) / scale_x[1]
          y_s = NN.predict(x=[x_s])
          y = y_s * scale_y[1] + scale_y[0]
  
          assert y - pyo.value(model.nn.outputs[0]) <= 1e-3
  
imports: import numpy
  import pyomo.environ
  import pytest
  from pyomo.common.dependencies import DeferredImportError
  from omlt.dependencies import keras, keras_available
  from conftest import get_neural_network_data
  from omlt.block import OmltBlock
  from omlt.neuralnet import FullSpaceNNFormulation, ReducedSpaceNNFormulation
  from omlt.neuralnet.activations import ComplementarityReLUActivation
  from omlt.scaling import OffsetScaling
label_desc: Use image node_id 11 for calling a global function with example usage: test_scaling_NN_block(datadir) and returns: int