def _is_nth_color(c):
 return (isinstance(c, six.string_types) and re.match(u'\\AC[0-9]\\Z', c))

def _is_nth_color ( c ) : return ( isinstance ( c , six . string_types ) and re . match ( u'\\AC[0-9]\\Z' , c ) )
return whether c can be interpreted as an item in the color cycle .