class_docstr: Redirects the value, unchanged, along a different connection whether the value is above
  or below the given threshold.
  
  :param threshold: the number to compare the input value against. This is also a parameter.
class_docstr_tok: ["Redirects","the","value",",","unchanged",",","along","a","different","connection","whether","the","value","is","above","or","below","the","given","threshold",".",":","param","threshold",":","the","number","to","compare","the","input","value","against",".","This","is","also","a","parameter","."]
docstr: Redirects the value, unchanged, along a different connection whether the value is above
  or below the given threshold.
  
  :param threshold: the number to compare the input value against. This is also a parameter.
docstr_tok: ["Redirects","the","value",",","unchanged",",","along","a","different","connection","whether","the","value","is","above","or","below","the","given","threshold",".",":","param","threshold",":","the","number","to","compare","the","input","value","against",".","This","is","also","a","parameter","."]
code: def run(self, value: int, threshold: Optional[int] = None):
      """
      Redirects the value, unchanged, along a different connection whether the value is above
      or below the given threshold.
  
      :param threshold: the number to compare the input value against. This is also a parameter.
      """
      if threshold is None:
          threshold = self.threshold
  
      if value < threshold:
          return {"below": value}
      return {"above": value}
  
imports: from typing import Optional
  from haystack.core.component import component
label_desc: Use image node_id 2 for calling the Threshold obj's underlying member method code with example usage: obj.run(value, threshold) and returns: dict, dict