code: def from_ip(cls, ip):
          
          ips = dict([(ip_['ip'], ip_['id'])
                      for ip_ in cls.list({'items_per_page': 500})])
          return ips.get(ip)
docs: Retrieve ip id associated to an ip.