fix `_identity_papply` to accept axis size
fix `_identity_papply` to accept axis size

Co-authored-by: Matthew Johnson <e68678f07030b810d1440f7f1c1c423f5afe56fe@google.com>

google/jax,tensorflow/probability,google/jax,tensorflow/probability,google/jax,google/jax