code: def extract_categories(line: str) -> Set[str]:
      categories = set()
      category_form1 = re.findall(r"\[\[Category:(.*)\]\]", line)
      for cat in category_form1:
          if DISAMBIGUATION_TITLE in cat:
              cat = cat.replace(DISAMBIGUATION_TITLE, "")
          categories.add(cat)
  
      prog = re.search("^{{(disambig.*|Disambig.*)}}$", line)
      if prog is not None:
          category_form2 = prog.group(1)
          cats = category_form2.split("|")
          categories.update(cats)
  
      return categories
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/data_types/wiki/wikipedia_page_extracted_relations.py
imports: import re
  import string
  from typing import Set, Dict
  from nlp_architect.utils.string_utils import StringUtils
label_desc: Use image node_id 5 for calling the WikipediaPageExtractedRelations obj's underlying member method code with example usage: obj.extract_categories(line) and returns: categories