def __init__(self, kernels, name=None):
if not kernels:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if len(set([k.feature_ndims for k in kernels])) > <NUM_LIT:1>:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" %<EOL>str([k.feature_ndims for k in kernels]))<EOL><DEDENT>self._kernels = _flatten_summand_list(kernels)<EOL>if name is None:<EOL><INDENT>name = '<STR_LIT>'<EOL><DEDENT>super(_SumKernel, self).__init__(<EOL>feature_ndims=kernels[<NUM_LIT:0>].feature_ndims,<EOL>dtype=util.maybe_get_common_dtype(<EOL>[None if k.dtype is None else k for k in kernels]),<EOL>name=name)<EOL>
Create a kernel which is the sum of `kernels`.

        The input list is 'flattened' in the sense that any entries which are also
        of type `_SumKernel` will have their list of kernels appended to this
        instance's list of kernels. This will reduce the stack depth when actually
        evaluating the sum over kernel applications.

        Args:
          kernels: Python `list` of `PositiveSemidefiniteKernel` instances.
          name: Python `str` name prefixed to Ops created by this class.
        Raises:
          ValueError: `kernels` is an empty list, or `kernels` don't all have the
          same `feature_ndims`.