def _set_wavefield_save_strategy(requires_grad, dt, inner_dt, scalar_wrapper):
    """Decides which of the source wavefield saving strategies to use.

    The source wavefield must be saved for backpropagation if model gradients
    required. The C code provides multiple ways of doing this, which are
    applicable in different situations.

    Args:
        requires_grad: Boolean specifying whether model gradients are required
        dt: The time interval between source samples
        inner_dt: The time interval between time steps of the wave propagator
        scalar_wrapper: The object that contains enum values for the strategies

    Returns:
        An enum value specifying which strategy to use
    """
    if requires_grad:
        wavefield_save_strategy = scalar_wrapper.STRATEGY_COPY
    else:
        wavefield_save_strategy = scalar_wrapper.STRATEGY_NONE

    return wavefield_save_strategy