import re


def parse_string_to_int_tuples(tuples):
  """ parse a string to tuples, while the string is:
      (x, x, x, x), (x, x)...
  """
  tuple_list = re.findall('[(](.*?)[)]', tuples)
  ret = []
  for i in tuple_list:
    int_shape = []
    shape = i.strip().split(',')
    for j in shape:
      if j:
        int_shape.append(int(j))
    ret.append(tuple(int_shape))
  return ret