code: def test_sparse_to_dense_mask_presence_mask(self):
      op = core.CreateOperator(
          "SparseToDenseMask",
          ["indices", "values", "default", "lengths"],
          ["output", "presence_mask"],
          mask=[11, 12],
          return_presence_mask=True,
      )
      workspace.FeedBlob(
          "indices", np.array([11, 12, 13], dtype=np.int32)
      )
      workspace.FeedBlob(
          "values", np.array([11, 12, 13], dtype=np.float64)
      )
      workspace.FeedBlob("default", np.array(-1, dtype=np.float64))
      workspace.FeedBlob("lengths", np.array([1, 2], dtype=np.int32))
  
      workspace.RunOperatorOnce(op)
  
      output = workspace.FetchBlob("output")
      presence_mask = workspace.FetchBlob("presence_mask")
      expected_output = np.array([[11, -1], [-1, 12]], dtype=np.float64)
      expected_presence_mask = np.array(
          [[True, False], [False, True]], dtype=bool
      )
      self.assertEqual(output.shape, expected_output.shape)
      np.testing.assert_array_equal(output, expected_output)
      self.assertEqual(
          presence_mask.shape, expected_presence_mask.shape
      )
      np.testing.assert_array_equal(
          presence_mask, expected_presence_mask
      )
  
file_path: pytorch/caffe2/python/sparse_to_dense_mask_test.py
imports: from caffe2.python import core, workspace
  from caffe2.python.test_util import TestCase
  import numpy
label_desc: Use image node_id 7 for calling the TestSparseToDenseMask obj's underlying member method code with example usage: obj.test_sparse_to_dense_mask_presence_mask() without return types