  We propose a generic transformation that can convert any nonbinary
$(n=k+r,k)$ maximum distance separable (MDS) code into another $(n,k)$ MDS code
over the same field such that 1) some arbitrarily chosen $r$ nodes have the
optimal repair bandwidth and the optimal rebuilding access, 2) for the
remaining $k$ nodes, the normalized repair bandwidth and the normalized
rebuilding access (over the file size) are preserved, 3) the sub-packetization
level is increased only by a factor of $r$. Two immediate applications of this
generic transformation are then presented. The first application is that we can
transform any nonbinary MDS code with the optimal repair bandwidth or the
optimal rebuilding access for the systematic nodes only, into a new MDS code
which possesses the corresponding repair optimality for all nodes. The second
application is that by applying the transformation multiple times, any
nonbinary $(n,k)$ scalar MDS code can be converted into an $(n,k)$ MDS code
with the optimal repair bandwidth and the optimal rebuilding access for all
nodes, or only a subset of nodes, whose sub-packetization level is also
optimal.
