def METHOD_NAME(self, size):
    if size is None:
        return sys.maxsize
    elif not isinstance(size, int):
        raise TypeError("size must be an integral type")
    elif size < 0:
        return sys.maxsize
    return size