<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_inet_ptoi(bgp_id):
 """Convert an IPv4 address string format to a four byte long. """

    four_byte_id = None
    try:
        four_byte_id = ip.ipv4_to_int(bgp_id)
    except ValueError:
        LOG.debug('Invalid bgp id given for conversion to integer value %s',
                  bgp_id)

    return four_byte_id