code: def test_checkpointing_scalar_jax_array(self):
      global_mesh = jtu.create_global_mesh((2,), ("x"))
      global_input_shape = ()
      data = np.array(4)
      s = NamedSharding(global_mesh, P(None))
      array1 = array.make_array_from_callback(
          global_input_shape, s, lambda idx: data[idx]
      )
      ckpt_dir = pathlib.Path(self.create_tempdir("first").full_path)
  
      ckpt_paths = [str(ckpt_dir)]
      tspecs = jax.tree_util.tree_map(
          serialization.get_tensorstore_spec, ckpt_paths
      )
  
      manager = serialization.GlobalAsyncCheckpointManager()
      manager.serialize(
          [array1],
          tspecs,
          on_commit_callback=partial(
              self._on_commit_callback, ckpt_dir, ckpt_dir
          ),
      )
      manager.wait_until_finished()
  
      ds = NamedSharding(jtu.create_global_mesh((2,), ("x")), P(None))
  
      (m1,) = serialization.run_deserialization(
          [ds], tspecs, [()], [np.float32]
      )
  
      for l in m1.addressable_shards:
          self.assertArraysEqual(
              np.asarray(l.data), data.astype(np.float32)
          )
  
imports: import asyncio
  import math
  from functools import partial
  import os
  import pathlib
  import tracemalloc
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax._src import test_util
  from jax import config
  from jax._src import array
  from jax.sharding import NamedSharding, GSPMDSharding
  from jax.sharding import PartitionSpec
  from jax.experimental.array_serialization import serialization
  import numpy
  import tensorstore
  import unittest
label_desc: Use image node_id 6 for calling the CheckpointTest obj's underlying member method code with example usage: obj.test_checkpointing_scalar_jax_array() without return types