<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_reserved_ip(self, ip):
 """Check if the given ip address is in a reserved ipv4 address space. :param ip: ip address :return: boolean """

        theip = ipaddress(ip)
        for res in self._reserved_netmasks:
            if theip in ipnetwork(res):
                return True
        return False