code: def from_inet_ptoi(bgp_id):
      
      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
docs: Convert an IPv4 address string format to a four byte long.