def _stroke_and_fill_colors(color, border):
 if (not isinstance(color, colors.Color)):
  raise ValueError(('Invalid color %r' % color))
 if ((color == colors.white) and (border is None)):
  strokecolor = colors.black
 elif (border is None):
  strokecolor = color
 elif border:
  if (not isinstance(border, colors.Color)):
   raise ValueError(('Invalid border color %r' % border))
  strokecolor = border
 else:
  strokecolor = None
 return (strokecolor, color)

def _stroke_and_fill_colors ( color , border ) : if ( not isinstance ( color , colors . Color ) ) : raise ValueError ( ( 'Invalid color %r' % color ) ) if ( ( color == colors . white ) and ( border is None ) ) : strokecolor = colors . black elif ( border is None ) : strokecolor = color elif border : if ( not isinstance ( border , colors . Color ) ) : raise ValueError ( ( 'Invalid border color %r' % border ) ) strokecolor = border else : strokecolor = None return ( strokecolor , color )
helper function handle border and fill colors .