def METHOD_NAME(net):
    """Check class of final layer and return the number of outputs."""
    if isinstance(list(net._modules.values())[-1], snn.Lapicque):
        return 2
    if isinstance(list(net._modules.values())[-1], snn.Synaptic):
        return 3
    if isinstance(list(net._modules.values())[-1], snn.RSynaptic):
        return 3
    if isinstance(list(net._modules.values())[-1], snn.Leaky):
        return 2
    if isinstance(list(net._modules.values())[-1], snn.RLeaky):
        return 2
    if isinstance(list(net._modules.values())[-1], snn.SConv2dLSTM):
        return 3
    if isinstance(list(net._modules.values())[-1], snn.SLSTM):
        return 3
    if isinstance(list(net._modules.values())[-1], snn.Alpha):
        return 4
    else:  # if not from snn, assume from nn with 1 return
        return 1