def call(url, func, data=None, headers=None, <EOL>return_json=True, stream=False, <EOL>retry=True):
if DISABLE_SSL_CHECK is True:<EOL><INDENT>bot.warning('<STR_LIT>')<EOL><DEDENT>if data is not None:<EOL><INDENT>if not isinstance(data,dict):<EOL><INDENT>data = json.dumps(data)<EOL><DEDENT><DEDENT>response = func(url=url,<EOL>headers=headers,<EOL>data=data,<EOL>verify=not DISABLE_SSL_CHECK,<EOL>stream=stream)<EOL>if response.status_code in [<NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>bot.error("<STR_LIT>" %(response.reason,<EOL>response.status_code))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>bot.error("<STR_LIT>" %(response.reason,<EOL>response.status_code))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if response.status_code == <NUM_LIT>:<EOL><INDENT>if retry is True:<EOL><INDENT>headers = update_token(response, headers)<EOL>return call(url, func, data=data,<EOL>headers=headers,<EOL>return_json=return_json,<EOL>stream=stream, retry=False)<EOL><DEDENT>bot.error("<STR_LIT>" %(response.reason,<EOL>response.status_code))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>elif response.status_code == <NUM_LIT:200>:<EOL><INDENT>if return_json:<EOL><INDENT>try:<EOL><INDENT>response = response.json()<EOL><DEDENT>except ValueError:<EOL><INDENT>bot.error("<STR_LIT>")<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT><DEDENT><DEDENT>return response<EOL>
call will issue the call, and issue a refresh token
    given a 401 response, and if the client has a _update_token function

    Parameters
    ==========
    func: the function (eg, post, get) to call
    url: the url to send file to
    headers: headers for the request
    data: additional data to add to the request
    return_json: return json if successful