Return true on success and return false on failure.
517678
public function finishUploading() {
        $request = array(
            'url' => $this->url,
            'method' => 'post',
            'timeout' => $this->timeoutMs / 1000,
            'data' => array(
                'op' => 'upload_slice_finish',
                'session' => $this->session,
                'filesize' => $this->fileSize,
            ),
            'header' => array(
                'Authorization: ' . $this->signature,
            ),
        );

        $response = $this->sendRequest($request);
        if ($response === false) {
            return false;
        }

        $this->accessUrl = $response['data']['access_url'];
        $this->resourcePath = $response['data']['resource_path'];
        $this->sourceUrl = $response['data']['source_url'];

        return true;
    }
752198
def __assert_true(returned):
        '''
        
        '''
        result = "Pass"
        try:
            assert (returned is True), "{0} not True".format(returned)
        except AssertionError as err:
            result = "Fail: " + six.text_type(err)
        return result
727760
def _check_success(self):
        
        t, d, cos = self._compute_orientation()

        return d < 0.06 and t >= -0.12 and t <= 0.14 and cos > 0.95
1342674
def value(self, raw_value):
        """"""
        if raw_value in self._FALSE_VALUES:
            return False
        elif raw_value in self._TRUE_VALUES:
            return True
        else:
            raise ValueError(
                "Could not parse '{}' value as boolean".format(raw_value)
            )
802361
def success(self):
        """"""
        self._check_valid()
        return self._problem._p.Status == gurobipy.GRB.OPTIMAL
274740
def return_or_raise(cls, response, expected_status_code):
        """"""
        try:
            if response.status_code in expected_status_code:
                return response
        except TypeError:
            if response.status_code == expected_status_code:
                return response

        raise cls(response)
129352
def success(self):
        """"""
        self._check_valid()
        return self._problem._cp.solution.get_status() in (
            self._problem._cp.solution.status.optimal,
            self._problem._cp.solution.status.optimal_tolerance,
            self._problem._cp.solution.status.MIP_optimal)
1149878
def on_return(self, node):  # ('value',)
        """"""
        self.retval = self.run(node.value)
        if self.retval is None:
            self.retval = ReturnedNone
        return
235185
def to_bool(value):
    '''
    
    '''
    value = from_bool(value)
    if isinstance(value, bool):
        value = 'on' if value else 'off'
    elif value is None:
        value = 'none'

    return value
622387
def check_error(result):
    
    return (result.value != ReturnCode.SUCCESSFUL) and (result.value < ReturnCode.WARNING)
354162
def on_success(&block)
      on do |_, value, reason|
        block.call(value) unless reason
      end
    end
505866
def boolean(v):
    """"""
    if nodesetp(v):
        return len(v) > 0
    elif numberp(v):
        if v == 0 or v != v:
            return False
        return True
    elif stringp(v):
        return v != ''
    return v
294773
def success(request, message, extra_tags='', fail_silently=False, async=False):
    """"""
    if ASYNC and async:
        messages.success(_get_user(request), message)
    else:
        add_message(request, constants.SUCCESS, message, extra_tags=extra_tags,
                    fail_silently=fail_silently)
439586
def get_bool_value(self, section, option, default=True):
        """"""
        try:
            return self.parser.getboolean(section, option)
        except NoOptionError:
            return bool(default)
188412
def _run(self):
        """"""
        success = self.initialize()
        while success is None:
            success = self.propagate()
        return success
1184102
def ensure_true(bool_func: Callable[[Any], bool],
                message=None) -> Filter_T:
    

    def validate(value):
        if bool_func(value) is not True:
            _raise_failure(message)
        return value

    return validate
696359
def yes_or_no(message):
    """"""
    while True:
        print message, '(yes/no)',
        line = raw_input()
        if line is None:
            return None
        line = line.lower()
        if line == 'y' or line == 'ye' or line == 'yes':
            return True
        if line == 'n' or line == 'no':
            return False