def upper(bits, i, stride):
        """

        :return:
        """
        if stride >= 1:
            offset = i % stride
            max = StridedInterval.max_int(bits)  # pylint:disable=redefined-builtin
            max_offset = max % stride

            if max_offset >= offset:
                o = max - (max_offset - offset)
            else:
                o = max - ((max_offset + stride) - offset)
            return o
        else:
            return StridedInterval.max_int(bits)
def upper ( bits , i , stride ) : if stride >= 1 : offset = i % stride max = StridedInterval . max_int ( bits ) max_offset = max % stride if max_offset >= offset : o = max - ( max_offset - offset ) else : o = max - ( ( max_offset + stride ) - offset ) return o else : return StridedInterval . max_int ( bits )
:return: