This makes the code compatible with both Python 2 and 3. Change-Id: I721a5567842f2df6ce2a8af501787204daba3082