code: def _make_global_layout(self) -> None:
      if not self.is_head_specific:
          m = np.ones(
              [self.n_query_block, self.n_key_block], dtype=np.bool
          )
          r = product(*[range(n) for n in m.shape])
  
          for qb, kb in r:
              m[qb, kb] = np.any(self.block_layout(None, 0, qb, kb, 0))
      else:
          m = np.ones(
              [self.n_head, self.n_query_block, self.n_key_block],
              dtype=np.bool,
          )
          r = product(*[range(n) for n in m.shape])
  
          for h, qb, kb in r:
              m[h, qb, kb] = np.any(
                  self.block_layout(None, h, qb, kb, 0)
              )
  
      self.global_layout = m
  
imports: import math
  from abc import ABC, abstractmethod
  from itertools import product
  from typing import Any, Optional
  import attr
  import numpy
  import torch
label_desc: Use image node_id 2 for calling the AttentionMask obj's underlying member method code with example usage: obj._make_global_layout() without return types