class_docstr: Generic merge layer for elementwise merge functions.
  
  Used to implement `Sum`, `Average`, etc.
code: def build(self, input_shape):
      # Used purely for shape validation.
      if not isinstance(input_shape[0], tuple):
          raise ValueError(
              "A merge layer should be called on a list of inputs."
          )
      if len(input_shape) < 2:
          raise ValueError(
              "A merge layer should be called "
              "on a list of at least 2 inputs. "
              "Got " + str(len(input_shape)) + " inputs."
          )
      batch_sizes = {s[0] for s in input_shape if s} - {None}
      if len(batch_sizes) > 1:
          raise ValueError(
              "Can not merge tensors with different "
              "batch sizes. Got tensors with shapes : "
              + str(input_shape)
          )
      if input_shape[0] is None:
          output_shape = None
      else:
          output_shape = input_shape[0][1:]
      for i in range(1, len(input_shape)):
          if input_shape[i] is None:
              shape = None
          else:
              shape = input_shape[i][1:]
          output_shape = self._compute_elemwise_op_output_shape(
              output_shape, shape
          )
      # If the inputs have different ranks, we have to reshape them
      # to make them broadcastable.
      if (
          None not in input_shape
          and len(set(map(len, input_shape))) == 1
      ):
          self._reshape_required = False
      else:
          self._reshape_required = True
  
imports: from tensorflow.python.keras import backend
  from tensorflow.python.keras.engine import base_layer_utils
  from tensorflow.python.keras.engine.base_layer import Layer
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
label_desc: Use image node_id 4 for calling the _Merge obj's underlying member method code with example usage: obj.build(input_shape) without return types