code: def rule_2(dep_rel, relation_list, dep_entry, text):
      """Extract term if rule 2 applies.
  
      Args:
          dep_rel (DepRelation): Dependency relation.
          relation_list (list of DepRelation): Generic relations between all tokens.
          dep_entry (OpinionTerm): Dependent token.
          text (str): Sentence text.
      """
      candidate = None
      for curr_rt in relation_list:
          if (curr_rt.gov, curr_rt.rel, curr_rt.dep.norm_pos) == (
              dep_rel.gov,
              dep_rel.rel,
              POS.ADJ,
          ) and curr_rt.dep != dep_rel.dep:
              candidate = CandidateTerm(
                  curr_rt.dep, dep_rel.dep, text, dep_entry.polarity
              )
      return candidate
  
file_path: nlp-architect/nlp_architect/models/absa/train/rules.py
imports: from nlp_architect.models.absa.inference.data_types import Polarity
  from nlp_architect.models.absa.train.data_types import CandidateTerm, RelCategory, DepRelationTerm, POS
label_desc: Use image node_id 2 for calling a global function with example usage: rule_2(dep_rel, relation_list, dep_entry, text) and returns: candidate