def mean_representation(
    ground_truth_data,
    gaussian_encoder,
    random_state,
    save_path,
):
  """Extracts the mean representation from a Gaussian encoder.

  Args:
    ground_truth_data: GroundTruthData to be sampled from.
    gaussian_encoder: Function that takes observations as input and outputs a
      dictionary with mean and log variances of the encodings in the keys "mean"
      and "logvar" respectively.
    random_state: Numpy random state used for randomness.
    save_path: String with path where results can be saved.

  Returns:
    transform_fn: Function that takes as keyword arguments the "mean" and
      "logvar" tensors and returns a tensor with the representation.
    None as no variables are saved.

  """
  del ground_truth_data, gaussian_encoder, random_state, save_path

  def transform_fn(mean, logvar):
    del logvar
    return mean

  return transform_fn, None