code: def commandstring(text, BoldQ):
      "Bolds all lines in text that returns true by predicate BoldQ."
      s = text.split("\n")
      o = []
      for line in s:
          try:
              if BoldQ(line):
                  # if (line.lstrip()[0] == '#'):
                  o.append(line)
              else:
                  o.append(commandfy(line))
          except:
              o.append(line)
      return "\n".join(o)
  
label_desc: Use image node_id 2 for calling a global function with example usage: commandstring(text, BoldQ) and returns: str