class_docstr: Generic merge layer for elementwise merge functions.
  
  Used to implement `Sum`, `Average`, etc.
  
  Args:
      **kwargs: standard layer keyword arguments.
class_docstr_tok: ["Generic","merge","layer","for","elementwise","merge","functions",".","Used","to","implement","`","Sum","`",",","`","Average","`",",","etc",".","Args",":","*","*","kwargs",":","standard","layer","keyword","arguments","."]
code: def compute_mask(self, inputs, mask=None):
      if mask is None:
          return None
      if not isinstance(mask, (tuple, list)):
          raise ValueError(
              f"`mask` should be a list. Received: mask={mask}"
          )
      if not isinstance(inputs, (tuple, list)):
          raise ValueError(
              f"`inputs` should be a list. Received: inputs={inputs}"
          )
      if len(mask) != len(inputs):
          raise ValueError(
              "The lists `inputs` and `mask` should have the same length. "
              f"Received: inputs={inputs} of length {len(inputs)}, and "
              f"mask={mask} of length {len(mask)}"
          )
      if all(m is None for m in mask):
          return None
      masks = [
          ops.expand_dims(m, axis=0) for m in mask if m is not None
      ]
      return ops.all(
          ops.concatenate(masks, axis=0), axis=0, keepdims=False
      )
  
file_path: keras/keras/layers/merging/base_merge.py
imports: from keras import backend
  from keras import ops
  from keras.backend.common.keras_tensor import KerasTensor
  from keras.layers.layer import Layer
label_desc: Use image node_id 8 for calling the Merge obj's underlying member method code with example usage: obj.compute_mask(inputs, mask) and returns: ops, None, None