code: def testStatelessRandomNormal(self):
      # test dtype default float32 random
      result = stateless_random_ops.stateless_random_normal(
          [10], seed=constant_op.constant([0, 0], dtype=dtypes.int32)
      )
      self.assertEqual([10], result.shape)
  
      # test dtype double
      result = stateless_random_ops.stateless_random_normal(
          [10],
          seed=constant_op.constant([1, 2], dtype=dtypes.int32),
          dtype=dtypes.double,
      )
      self.assertEqual([10], result.shape)
  
      # test mean and stddev
      result = stateless_random_ops.stateless_random_normal(
          [10],
          seed=constant_op.constant([1, 2], dtype=dtypes.int32),
          mean=0,
          stddev=0,
      )
      self.assertEqual([10], result.shape)
      self.assertAllInRange(result, 0, 0)
  
      # test dtensor version of each, check layouts
      layout = Layout.replicated(self.mesh, rank=1)
  
      # test dtype default float 32 random
      result = d_random.stateless_random_normal(
          [10],
          seed=constant_op.constant([0, 0], dtype=dtypes.int32),
          layout=layout,
      )
      self.assertEqual([10], result.shape)
      self.assertEqual(layout, api.fetch_layout(result))
  
      # test dtype double
      result = d_random.stateless_random_normal(
          [10],
          seed=constant_op.constant([1, 2], dtype=dtypes.int32),
          dtype=dtypes.double,
          layout=layout,
      )
      self.assertEqual([10], result.shape)
      self.assertEqual(layout, api.fetch_layout(result))
  
      # test mean and stddev
      result = d_random.stateless_random_normal(
          [10],
          seed=constant_op.constant([1, 2], dtype=dtypes.int32),
          mean=0,
          stddev=0,
          layout=layout,
      )
      self.assertEqual([10], result.shape)
      self.assertAllInRange(result, 0, 0)
      self.assertEqual(layout, api.fetch_layout(result))
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import d_random
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python import numpy_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the APITest obj's underlying member method code with example usage: obj.testStatelessRandomNormal() without return types