Java code to convert between UTF8 and UTF16 offsets (Java string offsets to/from Python 3 string offsets)
No, there cannot be. UTF-16 uses a varying number of code units per codepoint and so does UTF-8. So, the indices are entirely dependent on the codepoints in the string. You have to scan the string and count. 
There are relationships between the encodings, though. A codepoint has two UTF-16 code units if and only if it has four UTF-8 code units. So, an algorithm could tally UTF-8 code units by scanning UTF-16 codepoints: 4 four a high surrogate, 0 for a low surrogate, 3 for some range, 2 for another and 1 for another.
Given a Java string and an offset into that String, what is the correct way of calculating the offset of that same location into an UTF8 string?
More specifically, given the offset of a valid codepoint in the Java string, how can one map that offset to a new offset of that codepoint in a Python 3 string? And vice versa?
Is there any library method which already provides the mapping between Java String offsets and Python 3 string offsets?