code: def make_random_mask(
      shape: Tuple[int, int], sparsity: float, seed: int
  ) -> np.ndarray:
      """Makes a random attention mask."""
      np.random.seed(seed)
      return np.random.binomial(
          n=1, p=1.0 - sparsity, size=shape
      ).astype(np.bool_)
  
imports: from __future__ import annotations
  import dataclasses
  from typing import Any, Callable, Sequence, Tuple
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: make_random_mask(shape, sparsity, seed) and returns: np