def mock_code(name):
    left_args = (0, 0, 0, 0, b'', (), (), (), '')
    if PY3:
        left_args = (0,) + left_args
    args = left_args + (name, 0, b'')
    return CodeType(*args)
Makes a fake code object by name for built-in functions.
dataset/ETHPy150Open what-studio/profiling/test/test_stats.py/mock_code