<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ip_to_array(ipaddress):
 """Convert a string representing an IPv4 address to 4 bytes."""

    res = []
    for i in ipaddress.split("."):
        res.append(int(i))

    assert len(res) == 4
    return res