docstr: Check if input mentions has the given relation between them
  
  Args:
      mention_x: MentionDataLight
      mention_y: MentionDataLight
      relation: RelationType
  
  Returns:
      RelationType: relation in case mentions has given relation or
          RelationType.NO_RELATION_FOUND otherwise
docstr_tok: ["Check","if","input","mentions","has","the","given","relation","between","them","Args",":","mention_x",":","MentionDataLight","mention_y",":","MentionDataLight","relation",":","RelationType","Returns",":","RelationType",":","relation","in","case","mentions","has","given","relation","or","RelationType.NO_RELATION_FOUND","otherwise"]
code: def extract_sub_relations(
      self,
      mention_x: MentionDataLight,
      mention_y: MentionDataLight,
      relation: RelationType,
  ) -> RelationType:
      """
      Check if input mentions has the given relation between them
  
      Args:
          mention_x: MentionDataLight
          mention_y: MentionDataLight
          relation: RelationType
  
      Returns:
          RelationType: relation in case mentions has given relation or
              RelationType.NO_RELATION_FOUND otherwise
      """
      mention_x_str = mention_x.tokens_str
      mention_y_str = mention_y.tokens_str
      if StringUtils.is_pronoun(
          mention_x_str.lower()
      ) or StringUtils.is_pronoun(mention_y_str.lower()):
          return RelationType.NO_RELATION_FOUND
  
      page_x = self.wordnet_impl.get_pages(mention_x)
      page_y = self.wordnet_impl.get_pages(mention_y)
  
      if page_x and page_y:
          if relation == RelationType.WORDNET_DERIVATIONALLY:
              return self.extract_derivation(page_x, page_y)
          if relation == RelationType.WORDNET_PARTIAL_SYNSET_MATCH:
              return self.extract_partial_synset_match(page_x, page_y)
          if relation == RelationType.WORDNET_SAME_SYNSET:
              return self.extract_same_synset_entity(page_x, page_y)
  
      return RelationType.NO_RELATION_FOUND
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/relations/wordnet_relation_extraction.py
imports: import logging
  import os
  from typing import Set, List
  from nlp_architect.common.cdc.mention_data import MentionDataLight
  from nlp_architect.data.cdc_resources.data_types.wn.wordnet_page import WordnetPage
  from nlp_architect.data.cdc_resources.relations.relation_extraction import RelationExtraction
  from nlp_architect.data.cdc_resources.relations.relation_types_enums import RelationType, OnlineOROfflineMethod
  from nlp_architect.data.cdc_resources.wordnet.wordnet_offline import WordnetOffline
  from nlp_architect.data.cdc_resources.wordnet.wordnet_online import WordnetOnline
  from nlp_architect.utils.string_utils import StringUtils
label_desc: Use image node_id 3 for calling the WordnetRelationExtraction obj's underlying member method code with example usage: obj.extract_sub_relations(mention_x, mention_y, relation) and returns: RelationType, RelationType, self, self, self