def METHOD_NAME(
    dtype, dtype_meta=None
):  # pylint: disable=too-many-return-statements
    '''Normalize a descriptive C++ type to numpy.dtype.'''
    if isinstance(dtype, np.dtype):
        return dtype
    if dtype in ['i32', 'int', 'int32', 'int32_t']:
        return np.dtype('int32')
    if dtype in ['u32', 'uint', 'uint_t', 'uint32', 'uint32_t']:
        return np.dtype('uint32')
    if dtype in [int, 'i64', 'int64', 'long long', 'int64_t']:
        return np.dtype('int64')
    if dtype in ['u64', 'uint64', 'uint64_t']:
        return np.dtype('uint64')
    if dtype in ['float32']:
        return np.dtype('float32')
    if dtype in ['float']:
        return np.dtype('float')
    if dtype in ['double', 'float64']:
        return np.dtype('double')
    if dtype.startswith('str'):
        return np.dtype(dtype_meta)
    return dtype