<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rgb_to_cmy(r, g=None, b=None):
 """Convert the color from RGB coordinates to CMY. Parameters: :r: :g: :b: Returns: The color as an (c, m, y) tuple in the range: (0, 0.5, 1) """

  if type(r) in [list,tuple]:
    r, g, b = r
  return (1-r, 1-g, 1-b)