<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mtxmg(m1, m2, ncol1, nr1r2, ncol2):
 """ Multiply the transpose of a matrix with another matrix, both of arbitrary size. http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/mtxmg_c.html :param m1: nr1r2 X ncol1 double precision matrix. :type m1: NxM-Element Array of floats :param m2: nr1r2 X ncol2 double precision matrix. :type m2: NxM-Element Array of floats :param ncol1: Column dimension of m1 and row dimension of mout. :type ncol1: int :param nr1r2: Row dimension of m1 and m2. :type nr1r2: int :param ncol2: Column dimension of m2. :type ncol2: int :return: Transpose of m1 times m2. :rtype: NxM-Element Array of floats """

    m1 = stypes.toDoubleMatrix(m1)
    m2 = stypes.toDoubleMatrix(m2)
    mout = stypes.emptyDoubleMatrix(x=ncol2, y=ncol1)
    ncol1 = ctypes.c_int(ncol1)
    nr1r2 = ctypes.c_int(nr1r2)
    ncol2 = ctypes.c_int(ncol2)
    libspice.mtxmg_c(m1, m2, ncol1, nr1r2, ncol2, mout)
    return stypes.cMatrixToNumpy(mout)