code: def parse_qactivation_layer(
      keras_layer, input_names, input_shapes, data_reader
  ):
      assert keras_layer["class_name"] == "QActivation"
      supported_activations = [
          "quantized_relu",
          "quantized_tanh",
          "binary_tanh",
          "ternary_tanh",
          "quantized_sigmoid",
          "quantized_bits",
          "binary",
          "ternary",
      ]
  
      layer = parse_default_keras_layer(keras_layer, input_names)
  
      activation_config = keras_layer["config"]["activation"]
      quantizer_obj = get_quantizer(activation_config)
      activation_config = {}
      # some activations are classes
      if hasattr(quantizer_obj, "get_config"):
          activation_config[
              "class_name"
          ] = quantizer_obj.__class__.__name__
          if (
              activation_config["class_name"] == "ternary"
              or activation_config["class_name"] == "binary"
          ):
              activation_config["class_name"] += "_tanh"
          activation_config["config"] = quantizer_obj.get_config()
      # some activation quantizers are just functions with no config
      else:
          activation_config["config"] = {}
          if "binary" in quantizer_obj.__name__:
              activation_config["class_name"] = "binary_tanh"
              activation_config["config"]["bits"] = 1
              activation_config["config"]["integer"] = 1
          elif "ternary" in quantizer_obj.__name__:
              activation_config["class_name"] = "ternary_tanh"
              activation_config["config"]["bits"] = 2
              activation_config["config"]["integer"] = 2
          else:
              activation_config["class_name"] = "unknown"
  
      if activation_config["class_name"] not in supported_activations:
          raise Exception(
              "Unsupported QKeras activation: {}".format(
                  activation_config["class_name"]
              )
          )
  
      if activation_config["class_name"] == "quantized_bits":
          activation_config["class_name"] = "linear"
  
      if activation_config["class_name"] == "ternary_tanh":
          layer["class_name"] = "TernaryTanh"
          layer["threshold"] = activation_config.get("config", {}).get(
              "threshold", 0.33
          )
          if layer["threshold"] is None:
              layer[
                  "threshold"
              ] = 0.33  # the default ternary tanh threshold for QKeras
          layer["activation"] = "ternary_tanh"
      elif (
          activation_config["class_name"] == "quantized_sigmoid"
          and not activation_config["config"].get(
              "use_real_sigmoid", False
          )
      ) or (
          activation_config["class_name"] == "quantized_tanh"
          and not activation_config["config"].get(
              "use_real_tanh", False
          )
      ):
          layer["class_name"] = "HardActivation"
          layer["slope"] = 0.5  # the default values in QKeras
          layer["shift"] = 0.5
          # Quartus seems to have trouble if the width is 1.
          layer["slope_prec"] = FixedPrecisionType(
              width=2, integer=0, signed=False
          )
          layer["shift_prec"] = FixedPrecisionType(
              width=2, integer=0, signed=False
          )
          layer["activation"] = activation_config["class_name"].replace(
              "quantized_", "hard_"
          )
      else:
          layer["class_name"] = "Activation"
          layer["activation"] = activation_config["class_name"].replace(
              "quantized_", ""
          )
  
      layer["activation_quantizer"] = activation_config
      return layer, [shape for shape in input_shapes[0]]
  
file_path: hls4ml/hls4ml/converters/keras/qkeras.py
imports: from qkeras.quantizers import get_quantizer
  from hls4ml.converters.keras.convolution import parse_conv1d_layer, parse_conv2d_layer
  from hls4ml.converters.keras.core import parse_batchnorm_layer, parse_dense_layer
  from hls4ml.converters.keras_to_hls import keras_handler, parse_default_keras_layer
  from hls4ml.model.types import FixedPrecisionType, QKerasBinaryQuantizer, QKerasPO2Quantizer, QKerasQuantizer
label_desc: Use image node_id 6 for calling a global function with example usage: parse_qactivation_layer(keras_layer, input_names, input_shapes, data_reader) and returns: layer,  unknown