The aim of this kata is to determine the number of sub-function calls made by an unknown function.
You have to write a function named `count_calls` which:
* takes as parameter a function and its arguments (args, kwargs)
* calls the function
* returns a tuple containing:
 * the number of function calls made inside it and inside all the sub-called functions recursively
 * the function return value.
NB: The call to the function itself is not counted.
HINT: The sys module may come in handy.
import sys

calls = 0
orig_func = ''

def profiler(frame, event, arg):
    nonlocal calls
    if event == 'call':
        if frame.f_code.co_name != orig_func:
            calls += 1

    return profiler


def count_calls(func, *args, **kwargs):
    """Count calls in function func"""
    nonlocal orig_func
    nonlocal calls
    sys.settrace(profiler)
    orig_func = func

    rv = func(*args, **kwargs)
    count = calls - 1

    # Clean up
    sys.settrace(None)
    calls = 0
    orig_func = ''

    return count, rv
import sys

calls = 0
orig_func = ''

def profiler(frame, event, arg):
    nonlocal calls
    if event == 'call':
        if frame.f_code.co_name != orig_func:
            calls += 1

    return profiler


def count_calls(func, *args, **kwargs):
    """Count calls in function func"""
    nonlocal orig_func
    nonlocal calls
    sys.settrace(profiler)
    orig_func = func

    rv = func(*args, **kwargs)
    count = calls - 1

    # Clean up
    sys.settrace(None)
    calls = 0
    orig_func = ''

    return count, rv