in awswrangler/_data_types.py [0:0]
def _split_fields(s: str) -> Iterator[str]:
counter: int = 0
last: int = 0
for i, x in enumerate(s):
if x in ("<", "("):
counter += 1
elif x in (">", ")"):
counter -= 1
elif x == "," and counter == 0:
yield s[last:i]
last = i + 1
yield s[last:]