code: def _extend_attention_mask(mask: torch.Tensor) -> torch.Tensor:
      mask = mask[:, None, None, :]
      mask = (1.0 - mask) * -10000.0
      return mask
  
file_path: espnet/espnet2/asr/encoder/hugging_face_transformers_encoder.py
imports: import copy
  import logging
  from typing import Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.encoder.abs_encoder import AbsEncoder
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
label_desc: Use image node_id 1 for calling a global function with example usage: _extend_attention_mask(mask) and returns: mask