code: def reconstruction_loss(
      real_embed: tf.Tensor,
      generated_embed: tf.Tensor,
      loss_type: str,
  ) -> tf.Tensor:
      """Calculate the reconstruction loss in multiple views/obfuscations.
  
      This function is used to calculate the quality of the reconstructed
      embeddings, using the real obfuscated embeddings as ground truth.
  
      Args:
        real_embed: Given embeddigns from obfuscated images. This must be a
          tensor of shape (batch_size, number_of_obfuscations, embedding_size).
        generated_embed: Generated embeddings from obfuscated images. This must
          have the same shape as real_embed.
        loss_type: The embedding loss to be used, currently one of
          [MSE, Contrastive].
  
      Returns:
        The embedding loss of the AutoEncoder.
      """
      # TODO(smyrnisg): add back contrastive loss.
      if loss_type == "MSE":
          embed_loss = tf.reduce_mean(
              tf.keras.metrics.mean_squared_error(
                  real_embed, generated_embed
              )
          )
      else:
          raise ValueError(
              "Embedding loss type not understood: {}".format(loss_type)
          )
  
      return embed_loss
  
imports: from typing import Optional
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: reconstruction_loss(real_embed, generated_embed, loss_type) and returns: embed_loss