code: def make_attention_mask_3d(source_mask, target_mask):
      """
      Returns a 3-dimensional (3-D) attention mask
      :param source_block: 2-D array
      :param target_block: 2-D array
      """
      mask = target_mask[:, None, :] * source_mask[:, :, None]
      return mask
  
imports: import itertools
  import math
  from typing import Dict, Iterator, List, Tuple, Union
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 17 for calling a global function with example usage: make_attention_mask_3d(source_mask, target_mask) and returns: mask