

def _to_ip_block(self, element, locations):
    location_id = element.get('datacenterId')
    location = list(filter((lambda x: (x.id == location_id)), locations))[0]
    return DimensionDataPublicIpBlock(id=element.get('id'), network_domain=self.ex_get_network_domain(findtext(element, 'networkDomainId', TYPES_URN)), base_ip=findtext(element, 'baseIp', TYPES_URN), size=findtext(element, 'size', TYPES_URN), location=x, status=findtext(element, 'state', TYPES_URN))

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py DimensionDataNodeDriver._to_ip_block/VarMisuse@101/145 `location`->`x`