def METHOD_NAME(self, tensor, tgt_len, src_len):
    assert tgt_len > self.stride
    sparse_mask = torch.empty((tgt_len, src_len)).float().fill_(float("-inf"))
    # If bidirectional, subset 2 is the same for every index
    subset_summaries = set()
    if self.is_bidirectional:
        subset_summaries = self.compute_subset_summaries(tgt_len)
    for i in range(tgt_len):
        fixed_attention_subset = self.compute_fixed_attention_subset(i, tgt_len)
        fixed_attention_subset = fixed_attention_subset.union(subset_summaries)
        included_word_indices = torch.LongTensor(list(fixed_attention_subset))
        sparse_mask[i].index_fill_(0, included_word_indices, 0)
    return sparse_mask.type_as(tensor)