def send_document(url, data, timeout=<NUM_LIT:10>, *args, **kwargs):
logger.debug("<STR_LIT>", url, data, timeout)<EOL>headers = CaseInsensitiveDict({<EOL>'<STR_LIT>': USER_AGENT,<EOL>})<EOL>if "<STR_LIT>" in kwargs:<EOL><INDENT>headers.update(kwargs.get("<STR_LIT>"))<EOL><DEDENT>kwargs.update({<EOL>"<STR_LIT:data>": data, "<STR_LIT>": timeout, "<STR_LIT>": headers<EOL>})<EOL>try:<EOL><INDENT>response = requests.post(url, *args, **kwargs)<EOL>logger.debug("<STR_LIT>", response.status_code)<EOL>return response.status_code, None<EOL><DEDENT>except RequestException as ex:<EOL><INDENT>logger.debug("<STR_LIT>", ex)<EOL>return None, ex<EOL><DEDENT>
Helper method to send a document via POST.

    Additional ``*args`` and ``**kwargs`` will be passed on to ``requests.post``.

    :arg url: Full url to send to, including protocol
    :arg data: Dictionary (will be form-encoded), bytes, or file-like object to send in the body
    :arg timeout: Seconds to wait for response (defaults to 10)
    :returns: Tuple of status code (int or None) and error (exception class instance or None)