(self, address: int)
return None
Check if an address belongs to any segment, and if yes, returns the beginning, the size, and the sort of the
        segment.

        :param address: The address to check
Check if an address belongs to any segment, and if yes, returns the beginning, the size, and the sort of the
        segment.
Check if an address belongs to any segment and if yes returns the beginning the size and the sort of the segment .
def occupied_by(self, address: int) -> Optional[Tuple[int,int,str]]:
        """
        Check if an address belongs to any segment, and if yes, returns the beginning, the size, and the sort of the
        segment.

        :param address: The address to check
        """

        idx = self.search(address)
        if len(self._list) <= idx:
            return None
        if self._list[idx].start <= address < self._list[idx].end:
            block = self._list[idx]
            return block.start, block.size, block.sort
        if idx > 0 and address < self._list[idx - 1].end:
            # TODO: It seems that this branch is never reached. Should it be removed?
            block = self._list[idx - 1]
            return block.start, block.size, block.sort
        return None
def occupied_by ( self , address : int ) -> Optional [ Tuple [ int , int , str ] ] : idx = self . search ( address ) if len ( self . _list ) <= idx : return None if self . _list [ idx ] . start <= address < self . _list [ idx ] . end : block = self . _list [ idx ] return block . start , block . size , block . sort if idx > 0 and address < self . _list [ idx - 1 ] . end : # TODO: It seems that this branch is never reached. Should it be removed? block = self . _list [ idx - 1 ] return block . start , block . size , block . sort return None