def METHOD_NAME(type: dace.typeclass) -> dace.typeclass:
    """ Returns the underlying type for any dtype. """
    if isinstance(type, dtypes.vector):
        return type.vtype
    elif isinstance(type, dtypes.pointer):
        return type.base_type
    else:
        return type