code: def test_block_diagonal_to_dense(self):
      matrices = [
          [[1.0, 0.1], [0.1, 1.0]],
          [[1.0, 0.3, 0.2], [0.3, 1.0, 0.5], [0.2, 0.5, 1.0]],
          [[1.0]],
      ]
      dense = utils.block_diagonal_to_dense(*matrices)
      expected_result = [
          [1.0, 0.1, 0.0, 0.0, 0.0, 0.0],
          [0.1, 1.0, 0.0, 0.0, 0.0, 0.0],
          [0.0, 0.0, 1.0, 0.3, 0.2, 0.0],
          [0.0, 0.0, 0.3, 1.0, 0.5, 0.0],
          [0.0, 0.0, 0.2, 0.5, 1.0, 0.0],
          [0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
      ]
      self.assertAllClose(dense, expected_result, rtol=1e-5, atol=1e-5)
  
file_path: tf-quant-finance/tf_quant_finance/models/utils_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models import utils
label_desc: Use image node_id 3 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_block_diagonal_to_dense() without return types