Enable constructing C++ ShardedDeviceArray instead of the Python object.
Enable constructing C++ ShardedDeviceArray instead of the Python object.

With the feature enabled, we must not use `type(arg) == ShardedDeviceAray` but use isinstance(arg, ShardedDeviceArray).

PiperOrigin-RevId: 390568762

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