code: def extract_sentences(d):
      if d["dialog"][0][0]["__selected-sentences__"]:
          return d["dialog"][0][0]["__selected-sentences__"]
      else:
          return d["dialog"][0][1]["text"]
  
imports: from projects.bb3.agents.module import Module
  import random
label_desc: Use image node_id 2 for calling a global function with example usage: extract_sentences(d) and returns: d, d