code: def recover_word_case(word, reference_word):
      """Makes the case of `word` like the case of `reference_word`.
  
      Supports lowercase, UPPERCASE, and Capitalized.
      """
      if reference_word.islower():
          return word.lower()
      elif reference_word.isupper() and len(reference_word) > 1:
          return word.upper()
      elif reference_word[0].isupper() and reference_word[1:].islower():
          return word.capitalize()
      else:
          # if other, just do not alter the word's case
          return word
  
file_path: TextAttack/textattack/transformations/word_swaps/word_swap_embedding.py
imports: from textattack.shared import AbstractWordEmbedding, WordEmbedding
  from .word_swap import WordSwap
label_desc: Use image node_id 1 for calling a global function with example usage: recover_word_case(word, reference_word) and returns: word, word, word, word