<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scale(scaleAmt):
 """ Create a scale matrix. scaleAmt is a Vector3 defining the x, y, and z scale values. """

        if not isinstance(scaleAmt, Vector3):
            raise ValueError("scaleAmt must be a Vector3")

        ma4 = Matrix4((scaleAmt.x, 0, 0, 0),
                      (0, scaleAmt.y, 0, 0),
                      (0, 0, scaleAmt.z, 0),
                      (0, 0, 0, 1))
        return ma4