code: def transformation_consists_of_word_swaps_and_deletions(
      transformation,
  ):
      """Determines if ``transformation`` is a word swap or consists of only word
      swaps and deletions."""
      from textattack.transformations import (
          WordDeletion,
          WordSwap,
          WordSwapGradientBased,
      )
  
      return transformation_consists_of(
          transformation,
          [WordDeletion, WordSwap, WordSwapGradientBased],
      )
  
file_path: TextAttack/textattack/shared/validators.py
imports: import re
  import textattack
  from textattack.goal_functions import InputReduction, MinimizeBleu, NonOverlappingOutput, TargetedClassification, UntargetedClassification
  from .None import logger
label_desc: Use image node_id 5 for calling a global function with example usage: transformation_consists_of_word_swaps_and_deletions(transformation) and returns: transformation_consists_of