code: def candle_color(open_: Series, close: Series) -> Series:
      color = close.copy().astype(int)
      color[close >= open_] = 1
      color[close < open_] = -1
      return color
  
imports: from pandas import Series
  from ._core import non_zero_range
label_desc: Use image node_id 1 for calling a global function with example usage: candle_color(open_, close) and returns: color