<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dispatch(self, method, url, auth=None, params=None, **kwargs):
 """ Send HTTP request, with given method, credentials and data to the given URL, and return the success and the result on success. """

        r = Request(
            method=method,
            url=url,
            auth=auth,
            params=params,
            data=kwargs)
        s = Session()
        resp = s.send(r.prepare())
        status = resp.status_code
        text = resp.text
        error = resp.reason
        if status >= 200 and status < 300:
            if text:
                try:
                    return (True, json.loads(text))
                except TypeError:
                    pass
                except ValueError:
                    pass
            return (True, text)
        elif status >= 300 and status < 400:
            return (
                False,
                'Unauthorized access, '
                'please check your credentials.')
        elif status >= 400 and status < 500:
            return (False, 'Service not found.')
        elif status >= 500 and status < 600:
                return (False, 'Server error.')
        else:
            return (False, error)