def METHOD_NAME(self, x):
    """Forward function."""
    outs = []
    for i, layer in enumerate(self.features):
        x = layer(x)
        if i in self.out_feature_indices:
            outs.append(x)
    if len(outs) == 1:
        return outs[0]
    else:
        return tuple(outs)