code: def _irregular(singular, plural):
      
      def caseinsensitive(string):
          return ''.join('[' + char + char.upper() + ']' for char in string)
  
      if singular[0].upper() == plural[0].upper():
          PLURALS.insert(0, (
              r"(?i)({}){}$".format(singular[0], singular[1:]),
              r'\1' + plural[1:]
          ))
          PLURALS.insert(0, (
              r"(?i)({}){}$".format(plural[0], plural[1:]),
              r'\1' + plural[1:]
          ))
          SINGULARS.insert(0, (
              r"(?i)({}){}$".format(plural[0], plural[1:]),
              r'\1' + singular[1:]
          ))
      else:
          PLURALS.insert(0, (
              r"{}{}$".format(singular[0].upper(),
                              caseinsensitive(singular[1:])),
              plural[0].upper() + plural[1:]
          ))
          PLURALS.insert(0, (
              r"{}{}$".format(singular[0].lower(),
                              caseinsensitive(singular[1:])),
              plural[0].lower() + plural[1:]
          ))
          PLURALS.insert(0, (
              r"{}{}$".format(plural[0].upper(), caseinsensitive(plural[1:])),
              plural[0].upper() + plural[1:]
          ))
          PLURALS.insert(0, (
              r"{}{}$".format(plural[0].lower(), caseinsensitive(plural[1:])),
              plural[0].lower() + plural[1:]
          ))
          SINGULARS.insert(0, (
              r"{}{}$".format(plural[0].upper(), caseinsensitive(plural[1:])),
              singular[0].upper() + singular[1:]
          ))
          SINGULARS.insert(0, (
              r"{}{}$".format(plural[0].lower(), caseinsensitive(plural[1:])),
              singular[0].lower() + singular[1:]
          ))
docs: A convenience function to add appropriate rules to plurals and singular
      for irregular words.
  
      :param singular: irregular word in singular form
      :param plural: irregular word in plural form