code: def test_all_dropout(self, gc, dc):
      X = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).astype(np.int64)
      Lengths = np.array([2, 2, 2, 2, 2]).astype(np.int32)
      replacement_value = -1
      self.ws.create_blob("X").feed(X)
      self.ws.create_blob("Lengths").feed(Lengths)
      sparse_dropout_op = core.CreateOperator(
          "SparseDropoutWithReplacement",
          ["X", "Lengths"],
          ["Y", "LY"],
          ratio=1.0,
          replacement_value=replacement_value,
      )
      self.ws.run(sparse_dropout_op)
      y = self.ws.blobs["Y"].fetch()
      lengths = self.ws.blobs["LY"].fetch()
      for elem in y:
          self.assertEqual(
              elem,
              replacement_value,
              "Expected all \
                  negative elements when dropout ratio is 1.",
          )
      for length in lengths:
          self.assertEqual(length, 1)
      self.assertEqual(sum(lengths), len(y))
  
file_path: pytorch/caffe2/python/operator_test/sparse_dropout_with_replacement_op_test.py
imports: from caffe2.python import core
  from hypothesis import given
  import caffe2.python.hypothesis_test_util
  import numpy
label_desc: Use image node_id 2 for calling the SparseDropoutWithReplacementTest obj's underlying member method code with example usage: obj.test_all_dropout(gc, dc) without return types