code: def _collapse_output(self, output):
      if self._collapse == "mean":
          if self._mean_by_nvert:
              output = (
                  K.sum(output, axis=1) / self._mean_by_nvert
              )  # check if correct; from pre-commit
          else:
              output = K.mean(output, axis=1)
      elif self._collapse == "sum":
          output = K.sum(output, axis=1)
      elif self._collapse == "max":
          output = K.max(output, axis=1)
  
      return output
  
imports: import tensorflow.keras
  from qkeras import QActivation, QDense, ternary
label_desc: Use image node_id 9 for calling the GarNet obj's underlying member method code with example usage: obj._collapse_output(output) and returns: output