code: def apply(self, root: str, gender: Union[Gender, None], number: Number, case: Case):
          
          if gender is None:
              return root + self.declension[number.value - 1][case.value - 1][len(self.root):]
          else:
              return root + self.declension[gender.value - 1][number.value - 1][case.value - 1][len(self.root):]
docs: >>> armr = DeclensionPattern("arm")
          >>> armr.set_declension([["armr", "arm", "armi", "arms"], ["armar", "arma", "örmum", "arma"]])
          >>> armr.get_declined(Case.accusative, Number.singular, None)
          'arm'
  
          >>> armr.apply("hest", None, Number.singular, Case.dative)
          'hesti'
  
          >>> armr.apply("hest", None, Number.plural, Case.dative)
          'hestum'
  
          >>> armr.apply("hest", None, Number.singular, Case.genitive)
          'hests'
  
          :param root: root of the word to decline
          :param gender: instance of Gender of the word to decline (nouns have only one gender so the gender is not mentioned
          in the declension: the value of gender must be None)
          :param number: instance of Number
          :param case: instance of Case
          :return: word declined the same way as the the attribute root of the DeclensionPattern instance.