code: def testConvertNestedTupleOfNumpyArray3DToLiteral(self):
      for array, etype, pbfield in float_arrays:
          inner_array = array(
              [
                  [[1, 2, 3], [4, 5, 6]],
                  [[10, 20, 30], [40, 50, 60]],
                  [[100, 200, 300], [400, 500, 600]],
                  [[1000, 2000, 3000], [4000, 5000, 6000]],
              ]
          )
          inner_spec = ([4, 2, 3], etype)
          inner_flat = [
              1,
              2,
              3,
              4,
              5,
              6,
              10,
              20,
              30,
              40,
              50,
              60,
              100,
              200,
              300,
              400,
              500,
              600,
              1000,
              2000,
              3000,
              4000,
              5000,
              6000,
          ]
          literal = xla_literal.ConvertNumpyArrayToLiteral(
              (inner_array, (inner_array, inner_array), inner_array)
          )
  
          self.assertTupleShape(
              literal.shape,
              (inner_spec, (inner_spec, inner_spec), inner_spec),
          )
  
          leaf_literals = (
              literal.tuple_literals[0],
              literal.tuple_literals[1].tuple_literals[0],
              literal.tuple_literals[1].tuple_literals[1],
              literal.tuple_literals[2],
          )
  
          for leaf_literal in leaf_literals:
              self.assertLayout(leaf_literal.shape.layout, [2, 1, 0])
              np.testing.assert_allclose(
                  pbfield(leaf_literal), inner_flat
              )
  
imports: import collections
  import itertools
  import operator
  from absl.testing import absltest
  import numpy
  from local_xla.xla import xla_data_pb2
  from xla.python_api import xla_literal
label_desc: Use image node_id 10 for calling the XlaLiteralTest obj's underlying member method code with example usage: obj.testConvertNestedTupleOfNumpyArray3DToLiteral() without return types