code: def content_loss(end_points, stylized_end_points, content_weights):
      """Content loss.
  
      Args:
        end_points: dict mapping VGG16 layer names to their corresponding Tensor
            value for the original input.
        stylized_end_points: dict mapping VGG16 layer names to their corresponding
            Tensor value for the stylized input.
        content_weights: dict mapping layer names to their associated content loss
            weight. Keys that are missing from the dict won't have their content
            loss computed.
  
      Returns:
        Tensor for the total content loss, dict mapping loss names to losses.
      """
      total_content_loss = np.float32(0.0)
      content_loss_dict = {}
  
      for name, weight in content_weights.items():
          loss = tf.reduce_mean(
              (end_points[name] - stylized_end_points[name]) ** 2
          )
          weighted_loss = weight * loss
  
          content_loss_dict["content_loss/" + name] = loss
          content_loss_dict[
              "weighted_content_loss/" + name
          ] = weighted_loss
          total_content_loss += weighted_loss
  
      content_loss_dict["total_content_loss"] = total_content_loss
  
      return total_content_loss, content_loss_dict
  
imports: from magenta.models.image_stylization import learning
  from magenta.models.image_stylization import vgg
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: content_loss(end_points, stylized_end_points, content_weights) and returns: total_content_loss,  content_loss_dict