code: def mean_pooling(model_output, attention_mask):
      token_embeddings = model_output[
          0
      ]  # First element of model_output contains all token embeddings
      input_mask_expanded = (
          attention_mask.unsqueeze(-1)
          .expand(token_embeddings.size())
          .float()
      )
      return torch.sum(
          token_embeddings * input_mask_expanded, 1
      ) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
  
imports: from transformers import AutoTokenizer, AutoModel
  import torch
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: mean_pooling(model_output, attention_mask) and returns: unknown