code: def make_chunk_mask(
      size: int,
      chunk_size: int,
      num_left_chunks: int = 0,
      device: torch.device = None,
  ) -> torch.Tensor:
      """Create chunk mask for the subsequent steps (size, size).
  
      Reference: https://github.com/k2-fsa/icefall/blob/master/icefall/utils.py
  
      Args:
          size: Size of the source mask.
          chunk_size: Number of frames in chunk.
          num_left_chunks: Number of left chunks the attention module can see.
                             (null or negative value means full context)
          device: Device for the mask tensor.
  
      Returns:
          mask: Chunk mask. (size, size)
  
      """
      mask = torch.zeros(size, size, device=device, dtype=torch.bool)
  
      for i in range(size):
          if num_left_chunks <= 0:
              start = 0
          else:
              start = max(
                  (i // chunk_size - num_left_chunks) * chunk_size, 0
              )
  
          end = min((i // chunk_size + 1) * chunk_size, size)
          mask[i, start:end] = True
  
      return ~mask
  
file_path: espnet/espnet2/asr_transducer/utils.py
imports: from typing import List, Tuple, Union
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: make_chunk_mask(size, chunk_size, num_left_chunks, device) and returns: unknown