code: def dropout_mask(
      x: Tensor,  # Source tensor, output will be of the same type as `x`
      sz: list,  # Size of the dropout mask as `int`s
      p: float,  # Dropout probability
  ) -> Tensor:  # Multiplicative dropout mask
      "Return a dropout mask of the same type as `x`, size `sz`, with probability `p` to cancel an element."
      return x.new_empty(*sz).bernoulli_(1 - p).div_(1 - p)
  
imports: from __future__ import annotations
  from ...data.all import *
  from ..core import *
label_desc: Use image node_id 1 for calling a global function with example usage: dropout_mask(x, sz, p) and returns: x