code: def masked_mean(mask, value, dim, eps=1e-4):
      mask = mask.expand(*value.shape)
      return torch.sum(mask * value, dim=dim) / (
          eps + torch.sum(mask, dim=dim)
      )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/esm/openfold_utils/tensor_utils.py
imports: from functools import partial
  from typing import List
  import torch
  import torch.nn
label_desc: Use image node_id 4 for calling a global function with example usage: masked_mean(mask, value, dim, eps) and returns: unknown