def _obtain_train_mode(nb_of_conv_layers_to_fine_tune):
    """Obtains the train mode string based on the provided number of conv. layers that will be fine-tuned.

    # Arguments
        nb_of_conv_layers_to_fine_tune: integer to indicate the number of convolutional layersto fine-tune.
            One of `1`, `2` or `3`.
    # Returns
        A string that will serve as the train mode of the model.
    """

    if nb_of_conv_layers_to_fine_tune == None:
        return 'feature_extraction'
    elif nb_of_conv_layers_to_fine_tune in {1, 2, 3}:
        return 'fine_tuning'
    else:
        raise ValueError('The `nb_of_conv_layers_to_fine_tune` argument should be either '
                         '`None` (indicates feature extraction mode), '
                         '`1`, `2` or `3`. More than 3 conv. blocks are not included '
                         'because the more parameters we are training (unfreezing), the more we are at risk of overfitting.')