code: def test_get_mask():
      assert get_mask() is None
  
      with poutine.mask(mask=True):
          assert get_mask() is True
      with poutine.mask(mask=False):
          assert get_mask() is False
  
      with pyro.plate("i", 2, dim=-1):
          mask1 = torch.tensor([False, True, True])
          mask2 = torch.tensor([True, True, False])
          with poutine.mask(mask=mask1):
              assert_equal(get_mask(), mask1)
              with poutine.mask(mask=mask2):
                  assert_equal(get_mask(), mask1 & mask2)
  
imports: import torch
  import pyro
  import pyro.poutine
  from pyro.poutine.runtime import get_mask, get_plates
  from tests.common import assert_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_mask() without return types