def METHOD_NAME(transformation):
    """Determines if ``transformation`` is a word swap or consists of only word
    swaps."""
    from textattack.transformations import WordSwap, WordSwapGradientBased
    return transformation_consists_of(transformation, [WordSwap, WordSwapGradientBased])