code: def extract_links_and_parenthesis(line: str):
      links = set()
      parenthesis_links = set()
      ext_links = re.findall(r"\[\[(.*)\]\]", line)
      for link in ext_links:
          split_link = link.split("|")
          for s_link in split_link:
              parenthesis_clean = None
              matcher = re.match(r"(.*)\s?\((.*)\)", s_link)
              if matcher:
                  s_link = matcher.group(1)
                  parenthesis_match = matcher.group(2)
                  if parenthesis_match.lower() != "disambiguation":
                      parenthesis_clean = re.sub(
                          "["
                          + string.punctuation
                          + string.whitespace
                          + "]",
                          " ",
                          parenthesis_match,
                      ).strip()
  
              s_link_clean = re.sub(
                  "[" + string.punctuation + string.whitespace + "]",
                  " ",
                  s_link,
              ).strip()
              if (
                  parenthesis_clean is not None
                  and DISAMBIGUATION_TITLE not in parenthesis_clean
              ):
                  parenthesis_links.add(parenthesis_clean)
  
              links.add(s_link_clean)
  
      return links, parenthesis_links
  
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 6 for calling the WikipediaPageExtractedRelations obj's underlying member method code with example usage: obj.extract_links_and_parenthesis(line) and returns: links,  parenthesis_links