Extract parse_addr function to utils.py