code: def test_basic_bernoulli(self):
      class SimpleOp(nn.Module):
          def forward(self, x):
              # generator=torch.Generator() is not supported by jit
              out = x.bernoulli()
              return out
  
      self.checkExportImport(SimpleOp(), (torch.ones(3, 3),))
  
imports: import unittest
  import torch
  import nni.nas.nn.pytorch.layers
  from .convert_mixin import ConvertMixin, ConvertWithShapeMixin
label_desc: Use image node_id 18 for calling the TestConvert obj's underlying member method code with example usage: obj.test_basic_bernoulli() and returns: out