Check for `ArrayImpl` rather than `sharding` because this code is supposed to check for concrete Array until a `shard_like` primitive exists.
Check for `ArrayImpl` rather than `sharding` because this code is supposed to check for concrete Array until a `shard_like` primitive exists.

PiperOrigin-RevId: 486689809

google/jax,google/jax,google/jax,google/jax