(self, address)
return False
Check if an address belongs to any segment

        :param address: The address to check
        :return: True if this address belongs to a segment, False otherwise
Check if an address belongs to any segment
Check if an address belongs to any segment
def is_occupied(self, address):
        """
        Check if an address belongs to any segment

        :param address: The address to check
        :return: True if this address belongs to a segment, False otherwise
        """

        idx = self.search(address)
        if len(self._list) <= idx:
            return False
        if self._list[idx].start <= address < self._list[idx].end:
            return True
        if idx > 0 and address < self._list[idx - 1].end:
            # TODO: It seems that this branch is never reached. Should it be removed?
            return True
        return False
def is_occupied ( self , address ) : idx = self . search ( address ) if len ( self . _list ) <= idx : return False if self . _list [ idx ] . start <= address < self . _list [ idx ] . end : return True if idx > 0 and address < self . _list [ idx - 1 ] . end : # TODO: It seems that this branch is never reached. Should it be removed? return True return False