docstr: Test with is_test=True for a deterministic reference impl.
code: def test_dropout_is_test(self, X, in_place, ratio, engine, gc, dc):
      """Test with is_test=True for a deterministic reference impl."""
      # TODO(lukeyeager): enable this path when the GPU path is fixed
      if in_place:
          # Skip if trying in-place on GPU
          assume(
              not (
                  gc.device_type in {caffe2_pb2.CUDA, caffe2_pb2.HIP}
                  and engine == ""
              )
          )
          # If in-place on CPU, don't compare with GPU
          dc = dc[:1]
  
      op = core.CreateOperator(
          "Dropout",
          ["X"],
          ["X" if in_place else "Y"],
          ratio=ratio,
          engine=engine,
          is_test=True,
      )
  
      self.assertDeviceChecks(dc, op, [X], [0])
      # No sense in checking gradients for test phase
  
      def reference_dropout_test(x):
          return x, np.ones(x.shape, dtype=bool)
  
      self.assertReferenceChecks(
          gc,
          op,
          [X],
          reference_dropout_test,
          # The 'mask' output may be uninitialized
          outputs_to_check=[0],
      )
  
file_path: pytorch/caffe2/python/operator_test/dropout_op_test.py
imports: from hypothesis import assume, given, settings
  import hypothesis.strategies
  import numpy
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
label_desc: Use image node_id 1 for calling the TestDropout obj's underlying member method code with example usage: obj.test_dropout_is_test(X, in_place, ratio, engine, gc, dc) and returns: x,  np