def METHOD_NAME(model):
    """Determines if ``model`` is task-compatible with
    ``GradientBasedWordSwap``.
    We can only take the gradient with respect to an individual word if
    the model uses a word-based tokenizer.
    """
    if isinstance(model, textattack.models.helpers.LSTMForClassification):
        return True
    else:
        raise ValueError(f"Cannot perform GradientBasedWordSwap on model {model}.")