[PATCH v2 openEuler-23.09 24/46] mpi: introduce mpi_key_length()