code: def smooth_monotonic_activation_constraint(
      net_block, net, layer_block, layer, fcn
  ):
      r"""
      Activation constraint generator for a smooth monotonic function.
  
      Generates the constraints for the activation function :math:`f` if it is smooth and monotonic:
  
      .. math::
  
          \begin{align*}
              y=f(x)
          \end{align*}
  
      """
  
      @layer_block.Constraint(layer.output_indexes)
      def _smooth_monotonic_activation_constraint(b, *output_index):
          zhat_lb, zhat_ub = b.zhat[output_index].bounds
          if zhat_lb is not None:
              b.z[output_index].setlb(fcn(zhat_lb))
          if zhat_ub is not None:
              b.z[output_index].setub(fcn(zhat_ub))
          return b.z[output_index] == fcn(b.zhat[output_index])
  
imports: from pyomo.environ import exp, log, tanh
label_desc: Use image node_id 7 for calling a global function with example usage: smooth_monotonic_activation_constraint(net_block, net, layer_block, layer, fcn) and returns: unknown