in jupyter-gcs-contents-manager/gcs_contents_manager.py [0:0]
def get_file_checkpoint(self, checkpoint_id, path):
contents, content_type = self._checkpoint_contents(checkpoint_id, path)
checkpoint_obj = {
'type': 'file',
'content': contents.decode(utf8_encoding),
}
checkpoint_obj[
'format'] = 'text' if content_type == 'text/plain' else 'base64'
return checkpoint_obj