and ip_address_validator_map converted to a list, respectively. call the re.compile function with an argument raw string '^[\d,]+$', substitute the result for comma_separated_int_list_re.
comma_separated_int_list_re = re . compile ( '^[\d,]+$' )