def convert_dtypes(dtype_template, order_code):
dtypes = dtype_template.copy()<EOL>for k in dtypes:<EOL><INDENT>dtypes[k] = np.dtype(dtypes[k]).newbyteorder(order_code)<EOL><DEDENT>return dtypes<EOL>
Convert dtypes in mapping to given order

    Parameters
    ----------
    dtype_template : mapping
       mapping with values returning numpy dtype from ``np.dtype(val)``
    order_code : str
       an order code suitable for using in ``dtype.newbyteorder()``

    Returns
    -------
    dtypes : mapping
       mapping where values have been replaced by
       ``np.dtype(val).newbyteorder(order_code)``