A fourth-order method for computing the sign function of a matrix with application in the Yang–Baxter-like matrix equation