class_docstr: The Latent Context Embedding Additive (LCE-A) Kernel.
  
  This kernel is similar to the SACKernel, and is used when context breakdowns are
  unbserverable. It assumes the same additive structure and a spatial kernel shared
  across contexts. Rather than assuming independence, LCEAKernel models the
  correlation in the latent functions for each context through learning context
  embeddings.
docstr: Compute context covariance matrix.
  
  Returns:
      A (ns) x num_contexts x num_contexts tensor.
docstr_tok: ["Compute","context","covariance","matrix",".","Returns",":","A","(","ns",")","x","num_contexts","x","num_contexts","tensor","."]
code: def _eval_context_covar(self) -> Tensor:
      """Compute context covariance matrix.
  
      Returns:
          A (ns) x num_contexts x num_contexts tensor.
      """
      if len(self.batch_shape) > 0:
          # broadcast - (ns x num_contexts x k)
          all_embs = self._task_embeddings_batch()
      else:
          all_embs = (
              self._task_embeddings()
          )  # no broadcast - (num_contexts x k)
  
      context_covar = self.task_covar_module(all_embs).to_dense()
      if self.context_weight is None:
          context_outputscales = self.outputscale_list
      else:
          context_outputscales = (
              self.outputscale_list * self.context_weight
          )
      context_covar = (
          (
              context_outputscales.unsqueeze(-2)
          )  # (ns) x 1 x num_contexts
          .mul(context_covar)
          .mul(
              context_outputscales.unsqueeze(-1)
          )  # (ns) x num_contexts x 1
      )
      return context_covar
  
imports: from typing import Any, Dict, List, Optional
  import torch
  from gpytorch.constraints import Positive
  from gpytorch.kernels.kernel import Kernel
  from gpytorch.kernels.matern_kernel import MaternKernel
  from gpytorch.priors.torch_priors import GammaPrior
  from linear_operator.operators import DiagLinearOperator
  from linear_operator.operators.dense_linear_operator import DenseLinearOperator
  from torch import Tensor
  from torch.nn import ModuleList
label_desc: Use image node_id 8 for calling the LCEAKernel obj's underlying member method code with example usage: obj._eval_context_covar() and returns: context_covar