Hi! We'd have to double-check the terms of Google Colab, but if you're using the free tier, I don't think you can install Prodigy on it. The license does not allow installing the software on a server that's either public or not controlled by you. In general, Prodigy is designed so that the package is not required if you only want to train from the created annotations – you can always export them and use only the data.
If you just need the helper to convert a base64 URI to bytes, here it is:
import base64
def b64_uri_to_bytes(data_uri):
"""Convert a base64-encoded data URI to bytes. Mostly used for images."""
data = data_uri.split("base64,", 1)[1]
return base64.decodestring(bytes(data, "ascii"))