code: def ip_allocate(self, linode, public=True):
          
          result = self.client.post('/networking/ipv4/', data={
              "linode_id": linode.id if isinstance(linode, Base) else linode,
              "type": "ipv4",
              "public": public,
          })
  
          if not 'address' in result:
              raise UnexpectedResponseError('Unexpected response when adding IPv4 address!',
                      json=result)
  
          ip = IPAddress(self.client, result['address'], result)
          return ip
docs: Allocates an IP to a Instance you own.  Additional IPs must be requested
          by opening a support ticket first.
  
          :param linode: The Instance to allocate the new IP for.
          :type linode: Instance or int
          :param public: If True, allocate a public IP address.  Defaults to True.
          :type public: bool
  
          :returns: The new IPAddress
          :rtype: IPAddress