code: def pluralize(word, pos=NOUN, custom={}, classical=True):
      """Returns the plural of a given word.
      For example: child -> children.
      Handles nouns and adjectives, using classical inflection by default
      (e.g. where "matrix" pluralizes to "matrices" instead of "matrixes").
      The custom dictionary is for user-defined replacements.
      """
  
      if word in custom:
          return custom[word]
  
      # Recursion of genitives.
      # Remove the apostrophe and any trailing -s,
      # form the plural of the resultant noun, and then append an apostrophe (dog's -> dogs').
      if word.endswith("'") or word.endswith("'s"):
          owner = word.rstrip("'s")
          owners = pluralize(owner, pos, custom, classical)
          if owners.endswith("s"):
              return owners + "'"
          else:
              return owners + "'s"
  
      # Recursion of compound words
      # (Postmasters General, mothers-in-law, Roman deities).
      words = word.replace("-", " ").split(" ")
      if len(words) > 1:
          if (
              words[1] == "general"
              or words[1] == "General"
              and words[0] not in plural_categories["general-generals"]
          ):
              return word.replace(
                  words[0], pluralize(words[0], pos, custom, classical)
              )
          elif words[1] in plural_prepositions:
              return word.replace(
                  words[0], pluralize(words[0], pos, custom, classical)
              )
          else:
              return word.replace(
                  words[-1],
                  pluralize(words[-1], pos, custom, classical),
              )
  
      # Only a very few number of adjectives inflect.
      n = list(range(len(plural_rules)))
      if pos.startswith(ADJECTIVE):
          n = [0, 1]
  
      # Apply pluralization rules.
      for i in n:
          ruleset = plural_rules[i]
          for rule in ruleset:
              suffix, inflection, category, classic = rule
              # A general rule, or a classic rule in classical mode.
              if category == None:
                  if not classic or (classic and classical):
                      if suffix.search(word) is not None:
                          return suffix.sub(inflection, word)
              # A rule relating to a specific category of words.
              if category != None:
                  if word in plural_categories[category] and (
                      not classic or (classic and classical)
                  ):
                      if suffix.search(word) is not None:
                          return suffix.sub(inflection, word)
  
label_desc: Use image node_id 1 for calling a global function with example usage: pluralize(word, pos, custom, classical) and returns: custom, unknown, unknown, word, word, word, suffix, suffix