def get_numpy_datatype(element_type, byte_order_msb):
    """Returns the numpy datatype corresponding to this ElementType"""
    if byte_order_msb and (byte_order_msb or byte_order_msb == 'True'):
        prefix = '>'
    else:
        prefix = '<'
    switcher = {'MET_CHAR': 'i1', 'MET_UCHAR': 'u1', 'MET_SHORT': 'i2',
        'MET_USHORT': 'u2', 'MET_INT': 'i4', 'MET_UINT': 'u4', 'MET_LONG':
        'i4', 'MET_ULONG': 'u4', 'MET_LONG_LONG': 'i8', 'MET_ULONG_LONG':
        'u8', 'MET_FLOAT': 'f4', 'MET_DOUBLE': 'f8'}
    return prefix + switcher.get(element_type, 2)
