{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":59093,"databundleVersionId":7469972,"sourceType":"competition"}],"dockerImageVersionId":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\n#%matplotlib inline\n%matplotlib agg\n\nimport os\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.model_selection import StratifiedGroupKFold\n\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.train import Feature, Features, Example\nfrom tensorflow.train import Int64List, FloatList, BytesList\n\nfrom contextlib import ExitStack\n\nfrom PIL import Image\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-02-08T10:10:26.154495Z","iopub.execute_input":"2024-02-08T10:10:26.154924Z","iopub.status.idle":"2024-02-08T10:10:46.777201Z","shell.execute_reply.started":"2024-02-08T10:10:26.154886Z","shell.execute_reply":"2024-02-08T10:10:46.775991Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Path definition","metadata":{}},{"cell_type":"code","source":"EEG_TRAIN_PATH= '/kaggle/input/hms-harmful-brain-activity-classification/train_eegs/'\nSPEC_TRAIN_PATH = '/kaggle/input/hms-harmful-brain-activity-classification/train_spectrograms/'\nEEG_TEST_PATH = '/kaggle/input/hms-harmful-brain-activity-classification/test_eegs/'\nSPEC_TEST_PATH = '/kaggle/input/hms-harmful-brain-activity-classification/test_spectrograms/'\nif not os.path.exists('/kaggle/working/train_eegs_img/'):\n    os.makedirs('/kaggle/working/train_eegs_img/')\nEEG_IMG_TRAIN_PATH = '/kaggle/working/train_eegs_img/'\n\nif not os.path.exists('/kaggle/working/train_spec_img/'):\n    os.makedirs('/kaggle/working/train_spec_img/')\nSPEC_IMG_TRAIN_PATH='/kaggle/working/train_spec_img/'\n\nif not os.path.exists('/kaggle/working/tfrecord_files/'):\n    os.makedirs('/kaggle/working/tfrecord_files/')\nTFRECORDS_FILES ='/kaggle/working/tfrecord_files/'\nTFRECORDS_FILES_DATASET = '/kaggle/input/hms-train-subset'","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:10:49.165688Z","iopub.execute_input":"2024-02-08T10:10:49.166442Z","iopub.status.idle":"2024-02-08T10:10:49.174338Z","shell.execute_reply.started":"2024-02-08T10:10:49.166395Z","shell.execute_reply":"2024-02-08T10:10:49.173117Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#def generate_paths_tfrecords(name_subset, n_shards=5,path_file=TFRECORDS_FILES):\n    #create paths\n#    paths = [\"{}/{}.tfrecord-{:05d}-of-{:05d}\".format(path_file,name_subset, index, n_shards)\n#             for index in range(n_shards)]\n    \n#    return paths","metadata":{"execution":{"iopub.status.busy":"2024-02-07T15:52:33.894589Z","iopub.execute_input":"2024-02-07T15:52:33.894982Z","iopub.status.idle":"2024-02-07T15:52:33.901660Z","shell.execute_reply.started":"2024-02-07T15:52:33.894953Z","shell.execute_reply":"2024-02-07T15:52:33.900595Z"},"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#train_filepaths=generate_paths_tfrecords('HMS.train', n_shards=50)\n#valid_filepaths = generate_paths_tfrecords('HMS.valid', n_shards=5)","metadata":{"execution":{"iopub.status.busy":"2024-02-07T15:52:36.564770Z","iopub.execute_input":"2024-02-07T15:52:36.565169Z","iopub.status.idle":"2024-02-07T15:52:36.571507Z","shell.execute_reply.started":"2024-02-07T15:52:36.565139Z","shell.execute_reply":"2024-02-07T15:52:36.570288Z"},"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#for path in train_filepaths:\n#    os.remove(path)\n\n#for path in valid_filepaths:\n#    os.remove(path)","metadata":{"execution":{"iopub.status.busy":"2024-02-07T15:53:29.334292Z","iopub.execute_input":"2024-02-07T15:53:29.334827Z","iopub.status.idle":"2024-02-07T15:53:29.346264Z","shell.execute_reply.started":"2024-02-07T15:53:29.334785Z","shell.execute_reply":"2024-02-07T15:53:29.345325Z"},"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Functions to generate images of graphs","metadata":{}},{"cell_type":"markdown","source":"## EEG graph function","metadata":{}},{"cell_type":"code","source":"eeg_zone={\n    'Cz-Pz' : ['Cz', 'Pz'],\n    'Fz-Cz' : ['Fz', 'Cz'],\n    \n    'P4-O2' : ['P4', 'O2'],\n    'C4-P4' : ['C4', 'P4'],\n    'F4-C4' : ['F4', 'C4'],\n    'Fp2-F4': ['Fp2', 'F4'],\n    \n    'P3-O1' : ['P3', 'O1'],\n    'C3-P3' : ['C3', 'P3'],\n    'F3-C3' : ['F3', 'C3'],\n    'Fp1-F3' : ['Fp1', 'F3'],\n    \n    'T6-O2' : ['T6','O2'],\n    'T4-T6' : ['T4', 'T6'],\n    'F8-T4' : ['F8', 'T4'],\n    'Fp2-F8' : ['Fp2', 'F8'],\n    \n    'T5-O1' : ['T5', 'O1'],\n    'T3-T5' : ['T3', 'T5'],\n    'F7-T3' : ['F7', 'T3'],\n    'Fp1-F7' : ['Fp1', 'F7'],\n}","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:10:59.372414Z","iopub.execute_input":"2024-02-08T10:10:59.372847Z","iopub.status.idle":"2024-02-08T10:10:59.381743Z","shell.execute_reply.started":"2024-02-08T10:10:59.372815Z","shell.execute_reply":"2024-02-08T10:10:59.380172Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def generate_eeg(eegid,eegoffset,labelid='sample',input_path=EEG_TRAIN_PATH,eeg_zone=eeg_zone,linewidth=0.2, eeg_out=EEG_IMG_TRAIN_PATH):\n    #get eeg data\n    eeg = pd.read_parquet(f'{input_path}{eegid}.parquet')\n    #take subsample of 50sec\n    eeg = eeg.iloc[int(eegoffset*200):int((eegoffset+50)*200)]\n    \n    # generate the graph\n    ysticks=[]\n    labels= []\n    cicles= 0\n    relpos= 0\n    fig, ax = plt.subplots(1,1, figsize=(3,3), sharex= True)\n    \n    for key, values in eeg_zone.items():\n        ax.plot(eeg.index/200, eeg[values[0]]-eeg[values[1]]+relpos,color='black',linewidth=linewidth)\n        \n        ysticks.append(relpos)\n        labels.append(key)\n        if cicles==1 or cicles==5 or cicles==9 or cicles==13:\n            relpos+=200\n        else:\n            relpos+=40\n            \n        cicles+=1\n       \n    #ax.set_yticks(ysticks, labels=labels)\n    ax.set_xticks([])\n    ax.set_yticks([])\n    \n    ax.set_xlim(eegoffset,eegoffset+50)\n    save_path= f'{eeg_out}{eegid}_{labelid}.jpeg' \n    fig.savefig(save_path,bbox_inches='tight', dpi=100)\n    plt.close()\n    \n    return  save_path","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:01.397977Z","iopub.execute_input":"2024-02-08T10:11:01.399735Z","iopub.status.idle":"2024-02-08T10:11:01.411375Z","shell.execute_reply.started":"2024-02-08T10:11:01.399677Z","shell.execute_reply":"2024-02-08T10:11:01.410424Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path_eeg=generate_eeg(1628180742,0)\nImage.open(path_eeg)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:03.672131Z","iopub.execute_input":"2024-02-08T10:11:03.672665Z","iopub.status.idle":"2024-02-08T10:11:04.134732Z","shell.execute_reply.started":"2024-02-08T10:11:03.672620Z","shell.execute_reply":"2024-02-08T10:11:04.133394Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Spectrogram graph function","metadata":{}},{"cell_type":"code","source":"spec_zones=['LL','RL','LP','RP']\n\ndef generate_spectrogram(specid, specoffset,labelid='sample',\n                         input_path=SPEC_TRAIN_PATH, spec_out=SPEC_IMG_TRAIN_PATH,\n                         spec_zones=spec_zones,\n                        output_filter=0.5):\n    \n    #get spec data\n    spec = pd.read_parquet(f'{input_path}{specid}.parquet')\n    spec = spec.fillna(0)\n    #take subsample of 600sec (10min)\n    spec= spec.loc[(spec.time>=specoffset) & (spec.time<specoffset+600)]\n    #adpat dataset\n    spec=spec.set_index('time')\n    spec=spec.T\n    spec['column']=spec.index.str.split('_', expand=True)\n    \n    spec['freq'] = spec.column.apply(lambda x: x[1]).astype(float)\n    spec['brainreg'] = spec.column.apply(lambda x: x[0]).astype(str)\n    \n    spec=spec.drop('column', axis=1)\n    spec.set_index('freq',inplace=True)\n    #generate subdatases from brain zones\n    subspec=dict()\n    for zone in spec_zones:\n        subspec[f'{zone}_sub']=spec[spec.brainreg==zone]\n        subspec[f'{zone}_sub']= subspec[f'{zone}_sub'].drop('brainreg', axis=1)\n    \n    # generate the graph\n    \n    fig, ax = plt.subplots(nrows=len(spec_zones), figsize=(3,3), sharex=True)\n    for row in range(len(spec_zones)):\n        data=subspec[f'{spec_zones[row]}_sub']\n        ax[row].imshow(data, cmap='turbo', \n                       aspect='auto', \n                       origin='lower', \n                       extent=[data.columns.min(),data.columns.max(),data.index.min(),data.index.max()],\n                      vmin=0,vmax=data.max().max()*output_filter)\n        \n        ax[row].set_xticks([])\n        ax[row].set_yticks([])\n        \n    plt.subplots_adjust(hspace=0.01)\n    \n    save_path= f'{spec_out}{specid}_{labelid}.jpeg'\n    fig.savefig(save_path,bbox_inches='tight', dpi=100)\n    plt.close()\n    #plt.show()\n    return save_path","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:07.685919Z","iopub.execute_input":"2024-02-08T10:11:07.686431Z","iopub.status.idle":"2024-02-08T10:11:07.703094Z","shell.execute_reply.started":"2024-02-08T10:11:07.686391Z","shell.execute_reply":"2024-02-08T10:11:07.702124Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"spect_path=generate_spectrogram(353733,0, output_filter=0.7)\nImage.open(spect_path)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:10.333380Z","iopub.execute_input":"2024-02-08T10:11:10.334500Z","iopub.status.idle":"2024-02-08T10:11:10.669883Z","shell.execute_reply.started":"2024-02-08T10:11:10.334447Z","shell.execute_reply":"2024-02-08T10:11:10.668967Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def drop_images(paths):\n    for path in paths:\n        os.remove(path)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:13.092599Z","iopub.execute_input":"2024-02-08T10:11:13.093783Z","iopub.status.idle":"2024-02-08T10:11:13.099540Z","shell.execute_reply.started":"2024-02-08T10:11:13.093740Z","shell.execute_reply":"2024-02-08T10:11:13.097991Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Process metadata for labels","metadata":{}},{"cell_type":"code","source":"def process_metadata(df):\n    labels = pd.DataFrame()\n    conditions = df.columns[9:-1]\n    df['vote_sum'] = df.iloc[:, 9:-1].sum(axis=1)\n    labels['label_id'] = df['label_id'].copy()\n\n    for condition in conditions:\n        df[f'{condition}_tp1'] = df[condition] / df['vote_sum']\n        labels[condition] = df[condition] / df['vote_sum'].copy()\n\n    for condition in conditions:\n        df.loc[df[f'{condition}_tp1'] > 0.6, 'clasificacion_casos'] = 'idealized'\n        df.loc[(df['other_vote_tp1'] >= 0.4) & (df['other_vote_tp1'] <= 0.6) & (df[f'{condition}_tp1'] <= 0.6) & (df[f'{condition}_tp1'] >= 0.4), 'clasificacion_casos'] = 'proto'\n\n    df['clasificacion_casos'] = df['clasificacion_casos'].fillna('edge')\n    return [df, labels]","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:08.020433Z","iopub.execute_input":"2024-02-08T10:27:08.020915Z","iopub.status.idle":"2024-02-08T10:27:08.032633Z","shell.execute_reply.started":"2024-02-08T10:27:08.020881Z","shell.execute_reply":"2024-02-08T10:27:08.031137Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"metadata = pd.read_csv('/kaggle/input/hms-harmful-brain-activity-classification/train.csv')","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:17.853878Z","iopub.execute_input":"2024-02-08T10:11:17.854372Z","iopub.status.idle":"2024-02-08T10:11:18.189552Z","shell.execute_reply.started":"2024-02-08T10:11:17.854331Z","shell.execute_reply":"2024-02-08T10:11:18.188303Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# tensorflow functions\n## Tensorflow protobuf image serialized example","metadata":{}},{"cell_type":"code","source":"def create_example(eeg_image, spec_image, label):\n    image_data_eeg = tf.io.encode_jpeg(eeg_image)\n    image_data_spec = tf.io.encode_jpeg(spec_image)\n    #image_data = tf.io.encode_jpeg(image[..., np.newaxis])\n    return Example(\n        features=Features(\n            feature={\n                \"image_eeg\": Feature(bytes_list=BytesList(value=[image_data_eeg.numpy()])),\n                \"image_spec\" : Feature(bytes_list=BytesList(value=[image_data_spec.numpy()])),\n                \"label\": Feature(float_list=FloatList(value=label)),\n            }))","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:19.764743Z","iopub.execute_input":"2024-02-08T10:11:19.765222Z","iopub.status.idle":"2024-02-08T10:11:19.772850Z","shell.execute_reply.started":"2024-02-08T10:11:19.765185Z","shell.execute_reply":"2024-02-08T10:11:19.771796Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## TFrecords files generator","metadata":{}},{"cell_type":"code","source":"def write_tfrecords(name_subset, metadata,labels, n_shards=5,path_file=TFRECORDS_FILES):\n    #create paths\n    paths = [\"{}{}.tfrecord-{:05d}-of-{:05d}\".format(path_file,name_subset, index, n_shards)\n             for index in range(n_shards)]\n    \n    with ExitStack() as stack:\n        writers = [stack.enter_context(tf.io.TFRecordWriter(path))\n                   for path in paths]\n        counter= 0\n        for row in metadata.index:\n            #generate eeg img\n            eeg_path=generate_eeg(eegid=metadata.loc[row].eeg_id,\n                         eegoffset= metadata.loc[row].eeg_label_offset_seconds,\n                         labelid=metadata.loc[row].label_id\n                                 )\n            #generate spec\n            spec_path=generate_spectrogram(specid=metadata.loc[row].spectrogram_id,\n                         specoffset= metadata.loc[row].eeg_label_offset_seconds,\n                         labelid=metadata.loc[row].label_id,\n                                           output_filter=0.7)\n            \n            label = labels[labels.label_id==metadata.loc[row].label_id].to_numpy().squeeze()[1:]\n            shard = counter % n_shards\n            #create example\n            eeg_img = Image.open(eeg_path)\n            spec_img = Image.open(spec_path)\n            example=create_example(eeg_img,spec_img,label)\n            eeg_img.close()\n            spec_img.close()\n            #save and serialize\n            writers[shard].write(example.SerializeToString())\n            #drop images\n            drop_images(paths=[eeg_path,spec_path])\n            counter+=1\n    return paths","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:11:22.286131Z","iopub.execute_input":"2024-02-08T10:11:22.286892Z","iopub.status.idle":"2024-02-08T10:11:22.299567Z","shell.execute_reply.started":"2024-02-08T10:11:22.286852Z","shell.execute_reply":"2024-02-08T10:11:22.298183Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Train Pipeline generation data","metadata":{}},{"cell_type":"code","source":"sgkf = StratifiedGroupKFold(n_splits=5, shuffle=True, random_state=42)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:16.505755Z","iopub.execute_input":"2024-02-08T10:27:16.506273Z","iopub.status.idle":"2024-02-08T10:27:16.512463Z","shell.execute_reply.started":"2024-02-08T10:27:16.506233Z","shell.execute_reply":"2024-02-08T10:27:16.511142Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"metadata[\"fold\"] = -1","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:18.144924Z","iopub.execute_input":"2024-02-08T10:27:18.145432Z","iopub.status.idle":"2024-02-08T10:27:18.152169Z","shell.execute_reply.started":"2024-02-08T10:27:18.145389Z","shell.execute_reply":"2024-02-08T10:27:18.150717Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"metadata.reset_index(drop=True, inplace=True)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:19.697620Z","iopub.execute_input":"2024-02-08T10:27:19.698096Z","iopub.status.idle":"2024-02-08T10:27:19.703835Z","shell.execute_reply.started":"2024-02-08T10:27:19.698037Z","shell.execute_reply":"2024-02-08T10:27:19.702255Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for fold, (train_idx, valid_idx) in enumerate(\n    sgkf.split(metadata, y=metadata[\"expert_consensus\"], groups=metadata[\"patient_id\"])\n):\n    metadata.loc[valid_idx, 'fold'] = fold","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:21.865698Z","iopub.execute_input":"2024-02-08T10:27:21.866165Z","iopub.status.idle":"2024-02-08T10:27:23.410663Z","shell.execute_reply.started":"2024-02-08T10:27:21.866122Z","shell.execute_reply":"2024-02-08T10:27:23.409342Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"metadata.groupby([\"fold\", \"expert_consensus\"])[[\"eeg_id\"]].count().T","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:25.415670Z","iopub.execute_input":"2024-02-08T10:27:25.416132Z","iopub.status.idle":"2024-02-08T10:27:25.461361Z","shell.execute_reply.started":"2024-02-08T10:27:25.416096Z","shell.execute_reply":"2024-02-08T10:27:25.459619Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df = metadata[metadata.fold !=0]\nvalid_df = metadata[metadata.fold ==0]","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:27.728935Z","iopub.execute_input":"2024-02-08T10:27:27.729414Z","iopub.status.idle":"2024-02-08T10:27:27.747796Z","shell.execute_reply.started":"2024-02-08T10:27:27.729371Z","shell.execute_reply":"2024-02-08T10:27:27.746459Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(f\"# Num Train: {len(train_df)} | Num Valid: {len(valid_df)}\")","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:31.929551Z","iopub.execute_input":"2024-02-08T10:27:31.930000Z","iopub.status.idle":"2024-02-08T10:27:31.937003Z","shell.execute_reply.started":"2024-02-08T10:27:31.929964Z","shell.execute_reply":"2024-02-08T10:27:31.935625Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X_train_metadata,y_train_metadata= process_metadata(train_df)\nX_valid_metadata,y_valid_metadata = process_metadata(valid_df)","metadata":{"execution":{"iopub.status.busy":"2024-02-08T10:27:36.690518Z","iopub.execute_input":"2024-02-08T10:27:36.690955Z","iopub.status.idle":"2024-02-08T10:27:36.821976Z","shell.execute_reply.started":"2024-02-08T10:27:36.690920Z","shell.execute_reply":"2024-02-08T10:27:36.820783Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#%matplotlib agg\n#train_filepaths = write_tfrecords('HMS.train', X_train_metadata,y_train_metadata, n_shards=50)","metadata":{"execution":{"iopub.status.busy":"2024-02-05T13:01:31.497780Z","iopub.execute_input":"2024-02-05T13:01:31.498304Z","iopub.status.idle":"2024-02-05T13:03:54.897308Z","shell.execute_reply.started":"2024-02-05T13:01:31.498266Z","shell.execute_reply":"2024-02-05T13:03:54.894557Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%matplotlib agg\nvalid_filepaths = write_tfrecords('HMS.valid', X_valid_metadata,y_valid_metadata, n_shards=5)","metadata":{"execution":{"iopub.status.busy":"2024-02-06T09:11:55.220550Z","iopub.execute_input":"2024-02-06T09:11:55.220963Z","iopub.status.idle":"2024-02-06T09:12:20.785265Z","shell.execute_reply.started":"2024-02-06T09:11:55.220930Z","shell.execute_reply":"2024-02-06T09:12:20.783373Z"},"trusted":true},"execution_count":null,"outputs":[]}]}