def memoize(call):

    results = {}

    def wrapper(*args, **kwargs):
        key = (tuple(args), tuple(sorted(kwargs.iteritems())))

        try:
            return results[key]
        except KeyError:
            results[key] = result = call(*args, **kwargs)

            return result

    return wrapper
Test the ability to fork a repository.
dataset/ETHPy150Open borg-project/borg/borg/util.py/memoize--crossover with--dataset/ETHPy150Open sigmavirus24/github3.py/tests/integration/test_repos_repo.py/TestRepository.test_create_fork