def METHOD_NAME(path):
    try:
        f = open(path, 'rb')
    except IOError:
        print('ERROR: file %s not found' % path)
        sys.exit(1)
    hdr = f.read(5)
    if len(hdr) != 5 or (hdr != b'KTEST' and hdr != b'BOUT\n'):
        raise KTestError('unrecognized file')
    version, = struct.unpack('>i', f.read(4))
    if version > version_no:
        raise KTestError('unrecognized version')
    numArgs, = struct.unpack('>i', f.read(4))
    args = []
    for i in range(numArgs):
        size, = struct.unpack('>i', f.read(4))
        args.append(str(f.read(size).decode(encoding='ascii')))
    if version >= 2:
        symArgvs, = struct.unpack('>i', f.read(4))
        symArgvLen, = struct.unpack('>i', f.read(4))
    else:
        symArgvs = 0
        symArgvLen = 0
    numObjects, = struct.unpack('>i', f.read(4))
    objects = []
    for i in range(numObjects):
        size, = struct.unpack('>i', f.read(4))
        name = f.read(size).decode('utf-8')
        size, = struct.unpack('>i', f.read(4))
        bytes = f.read(size)
        objects.append((name, bytes))
    # Create an instance
    b = KTest(version, path, args, symArgvs, symArgvLen, objects)
    return b