def api_assert(condition, *args, **kwargs):
if not condition:<EOL><INDENT>raise APIError(*args, **kwargs)<EOL><DEDENT>
Assertion to fail with if not ``condition``

    Asserts that ``condition`` is ``True``, else raises an ``APIError``
    with the provided ``args`` and ``kwargs``

    :type  condition: bool