code: def _extract_device_name_from_event(event):
    
    plugin_data_content = json.loads(
        tf.compat.as_str(event.summary.value[0].metadata.plugin_data.content))
    return plugin_data_content['device']
docs: Extract device name from a tf.Event proto carrying tensor value.