{"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.11.11","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":10338,"databundleVersionId":862042,"sourceType":"competition"}],"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Approach\n\n* Firstly a convolutional neural network is used to segment the image, using the bounding boxes directly as a mask. \n* Secondly connected components is used to separate multiple areas of predicted pneumonia.\n* Finally a bounding box is simply drawn around every connected component.\n\n# Network\n\n* The network consists of a number of residual blocks with convolutions and downsampling blocks with max pooling.\n* At the end of the network a single upsampling layer converts the output to the same shape as the input.\n\nAs the input to the network is 256 by 256 (instead of the original 1024 by 1024) and the network downsamples a number of times without any meaningful upsampling (the final upsampling is just to match in 256 by 256 mask) the final prediction is very crude. If the network downsamples 4 times the final bounding boxes can only change with at least 16 pixels.","metadata":{"_uuid":"d320f90f432c331afea02ef66fcddb59448ea200"}},{"cell_type":"code","source":"import os\nimport csv\nimport random\nimport pydicom\nimport numpy as np\nimport pandas as pd\nfrom skimage import io\nfrom skimage import measure\nfrom skimage.transform import resize\n\nimport tensorflow as tf\nfrom tensorflow import keras\n\nfrom matplotlib import pyplot as plt\nimport matplotlib.patches as patches","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2025-06-11T15:31:27.884395Z","iopub.execute_input":"2025-06-11T15:31:27.884574Z","iopub.status.idle":"2025-06-11T15:31:43.74649Z","shell.execute_reply.started":"2025-06-11T15:31:27.884555Z","shell.execute_reply":"2025-06-11T15:31:43.745856Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Load pneumonia locations\n\nTable contains [filename : pneumonia location] pairs per row. \n* If a filename contains multiple pneumonia, the table contains multiple rows with the same filename but different pneumonia locations. \n* If a filename contains no pneumonia it contains a single row with an empty pneumonia location.\n\nThe code below loads the table and transforms it into a dictionary. \n* The dictionary uses the filename as key and a list of pneumonia locations in that filename as value. \n* If a filename is not present in the dictionary it means that it contains no pneumonia.","metadata":{"_uuid":"8d58cefae21c951e077c02c1a989d020f18465cc"}},{"cell_type":"code","source":"# empty dictionary\npneumonia_locations = {}\n# load table\nwith open(os.path.join('../input/stage_2_train_labels.csv'), mode='r') as infile:\n    # open reader\n    reader = csv.reader(infile)\n    # skip header\n    next(reader, None)\n    # loop through rows\n    for rows in reader:\n        # retrieve information\n        filename = rows[0]\n        location = rows[1:5]\n        pneumonia = rows[5]\n        # if row contains pneumonia add label to dictionary\n        # which contains a list of pneumonia locations per filename\n        if pneumonia == '1':\n            # convert string to float to int\n            location = [int(float(i)) for i in location]\n            # save pneumonia location in dictionary\n            if filename in pneumonia_locations:\n                pneumonia_locations[filename].append(location)\n            else:\n                pneumonia_locations[filename] = [location]","metadata":{"trusted":true,"_uuid":"e08496a85ef9b0823595c3745d2677c6e84b6a3a","execution":{"iopub.status.busy":"2025-06-11T15:31:43.748513Z","iopub.execute_input":"2025-06-11T15:31:43.749086Z","iopub.status.idle":"2025-06-11T15:31:43.82077Z","shell.execute_reply.started":"2025-06-11T15:31:43.749063Z","shell.execute_reply":"2025-06-11T15:31:43.819993Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Load filenames","metadata":{"_uuid":"5a4fa6da9833fd7cbd476d19584ba35695b38ddb"}},{"cell_type":"code","source":"# load and shuffle filenames\nfolder = '../input/stage_2_train_images'\nfilenames = os.listdir(folder)\nrandom.shuffle(filenames)\n# split into train and validation filenames\nn_valid_samples = 2560\ntrain_filenames = filenames[n_valid_samples:]\nvalid_filenames = filenames[:n_valid_samples]\nprint('n train samples', len(train_filenames))\nprint('n valid samples', len(valid_filenames))\nn_train_samples = len(filenames) - n_valid_samples","metadata":{"trusted":true,"_uuid":"ccd0b0d52cafd125558ed5560a9cc8fa15760bc5","execution":{"iopub.status.busy":"2025-06-11T15:31:43.821515Z","iopub.execute_input":"2025-06-11T15:31:43.821797Z","iopub.status.idle":"2025-06-11T15:31:44.505731Z","shell.execute_reply.started":"2025-06-11T15:31:43.821774Z","shell.execute_reply":"2025-06-11T15:31:44.505073Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Exploration","metadata":{"_uuid":"bd0633867d9d32180eb776703205767e8e891c50"}},{"cell_type":"code","source":"print('Total train images:',len(filenames))\nprint('Images with pneumonia:', len(pneumonia_locations))\n\nns = [len(value) for value in pneumonia_locations.values()]\nplt.figure()\nplt.hist(ns)\nplt.xlabel('Pneumonia per image')\nplt.xticks(range(1, np.max(ns)+1))\nplt.show()\n\nheatmap = np.zeros((1024, 1024))\nws = []\nhs = []\nfor values in pneumonia_locations.values():\n    for value in values:\n        x, y, w, h = value\n        heatmap[y:y+h, x:x+w] += 1\n        ws.append(w)\n        hs.append(h)\nplt.figure()\nplt.title('Pneumonia location heatmap')\nplt.imshow(heatmap)\nplt.figure()\nplt.title('Pneumonia height lengths')\nplt.hist(hs, bins=np.linspace(0,1000,50))\nplt.show()\nplt.figure()\nplt.title('Pneumonia width lengths')\nplt.hist(ws, bins=np.linspace(0,1000,50))\nplt.show()\nprint('Minimum pneumonia height:', np.min(hs))\nprint('Minimum pneumonia width: ', np.min(ws))\n","metadata":{"trusted":true,"_uuid":"daa7156380489227e510e8ef086b55c58b4b3ad8","execution":{"iopub.status.busy":"2025-06-11T15:31:44.506473Z","iopub.execute_input":"2025-06-11T15:31:44.506683Z","iopub.status.idle":"2025-06-11T15:31:47.929874Z","shell.execute_reply.started":"2025-06-11T15:31:44.506647Z","shell.execute_reply":"2025-06-11T15:31:47.929158Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":" # Data generator\n\nThe dataset is too large to fit into memory, so we need to create a generator that loads data on the fly.\n\n* The generator takes in some filenames, batch_size and other parameters.\n\n* The generator outputs a random batch of numpy images and numpy masks.\n    ","metadata":{"trusted":true,"collapsed":true,"_uuid":"276b80f59fa9acdfd9307d74cee5f705cd6aa5b6","jupyter":{"outputs_hidden":true}}},{"cell_type":"code","source":"class generator(keras.utils.Sequence):\n    \n    def __init__(self, folder, filenames, pneumonia_locations=None, batch_size=32, image_size=256, shuffle=True, augment=False, predict=False, **kwargs):\n        self.folder = folder\n        self.filenames = filenames\n        self.pneumonia_locations = pneumonia_locations\n        self.batch_size = batch_size\n        self.image_size = image_size\n        self.shuffle = shuffle\n        self.augment = augment\n        self.predict = predict\n        self.on_epoch_end()\n        super().__init__(**kwargs)\n        \n    def __load__(self, filename):\n        # load dicom file as numpy array\n        img = pydicom.dcmread(os.path.join(self.folder, filename)).pixel_array\n        # create empty mask\n        msk = np.zeros(img.shape)\n        # get filename without extension\n        filename = filename.split('.')[0]\n        # if image contains pneumonia\n        if filename in self.pneumonia_locations:\n            # loop through pneumonia\n            for location in self.pneumonia_locations[filename]:\n                # add 1's at the location of the pneumonia\n                x, y, w, h = location\n                msk[y:y+h, x:x+w] = 1\n        # resize both image and mask\n        img = resize(img, (self.image_size, self.image_size), mode='reflect')\n        msk = resize(msk, (self.image_size, self.image_size), mode='reflect') > 0.5\n        # if augment then horizontal flip half the time\n        if self.augment and random.random() > 0.5:\n            img = np.fliplr(img)\n            msk = np.fliplr(msk)\n        # add trailing channel dimension\n        img = np.expand_dims(img, -1).astype(\"float32\")\n        msk = np.expand_dims(msk, -1).astype(\"float32\")\n        return img, msk\n    \n    def __loadpredict__(self, filename):\n        # load dicom file as numpy array\n        img = pydicom.dcmread(os.path.join(self.folder, filename)).pixel_array\n        # resize image\n        img = resize(img, (self.image_size, self.image_size), mode='reflect')\n        # add trailing channel dimension\n        img = np.expand_dims(img, -1)\n        return img\n        \n    def __getitem__(self, index):\n        # select batch\n        filenames = self.filenames[index*self.batch_size:(index+1)*self.batch_size]\n        # predict mode: return images and filenames\n        if self.predict:\n            # load files\n            imgs = [self.__loadpredict__(filename) for filename in filenames]\n            # create numpy batch\n            imgs = np.array(imgs)\n            return imgs, filenames\n        # train mode: return images and masks\n        else:\n            # load files\n            items = [self.__load__(filename) for filename in filenames]\n            # unzip images and masks\n            imgs, msks = zip(*items)\n            # create numpy batch\n            imgs = np.array(imgs)\n            msks = np.array(msks)\n            return imgs, msks\n        \n    def on_epoch_end(self):\n        if self.shuffle:\n            random.shuffle(self.filenames)\n        \n    def __len__(self):\n        if self.predict:\n            # return everything\n            return int(np.ceil(len(self.filenames) / self.batch_size))\n        else:\n            # return full batches only\n            return int(len(self.filenames) / self.batch_size)","metadata":{"trusted":true,"_uuid":"86b3f780a03cddda78c6adfde461d6ff8dad5672","execution":{"iopub.status.busy":"2025-06-11T15:31:47.930758Z","iopub.execute_input":"2025-06-11T15:31:47.931311Z","iopub.status.idle":"2025-06-11T15:31:48.004743Z","shell.execute_reply.started":"2025-06-11T15:31:47.931281Z","shell.execute_reply":"2025-06-11T15:31:48.003895Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Network","metadata":{"_uuid":"ebc622a4b406354cc4ef28801eab72346a724d8b"}},{"cell_type":"code","source":"def create_downsample(channels, inputs):\n    x = keras.layers.BatchNormalization(momentum=0.9)(inputs)\n    x = keras.layers.LeakyReLU(0)(x)\n    x = keras.layers.Conv2D(channels, 1, padding='same', use_bias=False)(x)\n    x = keras.layers.MaxPool2D(2)(x)\n    return x\n\ndef create_resblock(channels, inputs):\n    x = keras.layers.BatchNormalization(momentum=0.9)(inputs)\n    x = keras.layers.LeakyReLU(0)(x)\n    x = keras.layers.Conv2D(channels, 3, padding='same', use_bias=False)(x)\n    x = keras.layers.BatchNormalization(momentum=0.9)(x)\n    x = keras.layers.LeakyReLU(0)(x)\n    x = keras.layers.Conv2D(channels, 3, padding='same', use_bias=False)(x)\n    return keras.layers.add([x, inputs])\n\ndef create_network(input_size, channels, n_blocks=2, depth=4):\n    # input\n    inputs = keras.Input(shape=(input_size, input_size, 1))\n    x = keras.layers.Conv2D(channels, 3, padding='same', use_bias=False)(inputs)\n    # residual blocks\n    for d in range(depth):\n        channels = channels * 2\n        x = create_downsample(channels, x)\n        for b in range(n_blocks):\n            x = create_resblock(channels, x)\n    # output\n    x = keras.layers.BatchNormalization(momentum=0.9)(x)\n    x = keras.layers.LeakyReLU(0)(x)\n    x = keras.layers.Conv2D(1, 1, activation='sigmoid')(x)\n    outputs = keras.layers.UpSampling2D(2**depth)(x)\n    model = keras.Model(inputs=inputs, outputs=outputs)\n    return model","metadata":{"trusted":true,"_uuid":"9fc2b108689637a6037b48ebab3f7659b8704bf9","execution":{"iopub.status.busy":"2025-06-11T15:31:48.005635Z","iopub.execute_input":"2025-06-11T15:31:48.005923Z","iopub.status.idle":"2025-06-11T15:31:48.123208Z","shell.execute_reply.started":"2025-06-11T15:31:48.0059Z","shell.execute_reply":"2025-06-11T15:31:48.122406Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def transformer_block(x, num_heads, proj_dim, mlp_mult=4, drop=0.1):\n    \"\"\"One standard transformer encoder block.\"\"\"\n    # Self-attention\n    y = keras.layers.LayerNormalization(epsilon=1e-6)(x)\n    y = keras.layers.MultiHeadAttention(num_heads=num_heads,\n                                        key_dim=proj_dim,\n                                        dropout=drop)(y, y)\n    x = keras.layers.Add()([x, y])\n    # Feed-forward\n    y = keras.layers.LayerNormalization(epsilon=1e-6)(x)\n    y = keras.layers.Dense(mlp_mult * proj_dim,\n                           activation=tf.nn.relu)(y)\n    y = keras.layers.Dropout(drop)(y)\n    y = keras.layers.Dense(proj_dim)(y)\n    return keras.layers.Add()([x, y])\n\ndef create_vit_seg(input_size=256,\n                   patch_size=16,\n                   proj_dim=64,\n                   num_layers=4,\n                   num_heads=4):\n    inputs = keras.Input(shape=(input_size, input_size, 1)) # (B, input_size, input_size, 1)\n\n    # Patch emedding\n    # Convert each patch_size x patch_size patch into proj_dim - dimensional embedding\n    x = keras.layers.Conv2D(filters=proj_dim,\n                            kernel_size=patch_size,\n                            strides=patch_size,\n                            padding='valid')(inputs) # (B, input_size/P, input_size/P, proj_dim)\n\n    # Flatten patches to a sequence\n    p = input_size // patch_size\n    seq = keras.layers.Reshape((p * p, proj_dim))(x) # (B, N, proj_dim)\n\n    # Learnable positional embeddings\n    pos_emb = keras.layers.Embedding(input_dim=p * p,\n                                     output_dim=proj_dim)(tf.range(p * p))\n    seq = seq + pos_emb\n\n    # Transformer encoder\n    for _ in range(num_layers):\n        seq = transformer_block(seq, num_heads, proj_dim)\n\n    # Reshape from 3D to 4D\n    x = keras.layers.Reshape((p, p, proj_dim))(seq) # (B, input_size/P, input_size/P, proj_dim)\n\n    # Deconv back to input_size x input_size \n    x = keras.layers.Conv2DTranspose(filters=1,\n                                     kernel_size=patch_size,\n                                     strides=patch_size,\n                                     padding='valid',\n                                     activation='sigmoid')(x) # (B, input_size, input_size, 1)\n\n    return keras.Model(inputs, x, name=\"VisionTransformer\")\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-06-11T15:31:48.125156Z","iopub.execute_input":"2025-06-11T15:31:48.125368Z","iopub.status.idle":"2025-06-11T15:31:48.145278Z","shell.execute_reply.started":"2025-06-11T15:31:48.125352Z","shell.execute_reply":"2025-06-11T15:31:48.144477Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Train network\n","metadata":{"_uuid":"bee3bc9363e9c1829eadf17da7a67fbd1a6a369e"}},{"cell_type":"code","source":"# define iou or jaccard loss function\ndef iou_loss(y_true, y_pred):\n    y_true = tf.reshape(y_true, [-1])\n    y_pred = tf.reshape(y_pred, [-1])\n    intersection = tf.reduce_sum(y_true * y_pred)\n    score = (intersection + 1.) / (tf.reduce_sum(y_true) + tf.reduce_sum(y_pred) - intersection + 1.)\n    return 1 - score\n\n# combine bce loss and iou loss\ndef iou_bce_loss(y_true, y_pred):\n    return 0.5 * keras.losses.binary_crossentropy(y_true, y_pred) + 0.5 * iou_loss(y_true, y_pred)\n\n# mean iou as a metric\ndef mean_iou(y_true, y_pred):\n    y_pred = tf.round(y_pred)\n    intersect = tf.reduce_sum(y_true * y_pred, axis=[1, 2, 3])\n    union = tf.reduce_sum(y_true, axis=[1, 2, 3]) + tf.reduce_sum(y_pred, axis=[1, 2, 3])\n    smooth = tf.ones(tf.shape(intersect))\n    return tf.reduce_mean((intersect + smooth) / (union - intersect + smooth))\n\n# create network and compiler\n# model = create_network(input_size=256, channels=32, n_blocks=2, depth=4)\nckpt_path = \"best.weights.h5\"     # you can point this wherever you like\n\ncheckpoint_cb = tf.keras.callbacks.ModelCheckpoint(\n    filepath=ckpt_path,\n    monitor=\"val_mean_iou\",   # track the validation mean IoU\n    mode=\"max\",               # larger is better\n    save_best_only=True,\n    save_weights_only=True,   # only weights → smaller file\n    verbose=1\n)\n\n#proj_dim, num_layers and num_heads from https://keras.io/examples/vision/image_classification_with_vision_transformer/ \nmodel = create_vit_seg(input_size=256, patch_size=16, proj_dim=128, num_layers=8, num_heads=4)\nmodel.compile(optimizer='adam',\n              loss=iou_bce_loss,\n              metrics=['accuracy', mean_iou])\n\n# cosine learning rate annealing\ndef cosine_annealing(x):\n    lr = 0.002\n    epochs = 100\n    return lr*(np.cos(np.pi*x/epochs)+1.)/2\nlearning_rate = tf.keras.callbacks.LearningRateScheduler(cosine_annealing)\n\n# create train and validation generators\nfolder = '../input/stage_2_train_images'\ntrain_gen = generator(folder, train_filenames, pneumonia_locations, batch_size=64, image_size=256, shuffle=True, augment=True, predict=False, workers=8, use_multiprocessing=True, max_queue_size=512)\nvalid_gen = generator(folder, valid_filenames, pneumonia_locations, batch_size=64, image_size=256, shuffle=False, predict=False, workers=8, use_multiprocessing=True, max_queue_size=512)\n\nhistory = model.fit(\n    train_gen,\n    validation_data=valid_gen,\n    callbacks=[learning_rate, checkpoint_cb],\n    epochs=100\n)\n\n# model.load_weights(ckpt_path)","metadata":{"trusted":true,"_uuid":"4369be30f61440eb6858d57829fa541c4ee893bf","execution":{"iopub.status.busy":"2025-06-11T15:31:48.146039Z","iopub.execute_input":"2025-06-11T15:31:48.146297Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(history.history.keys())","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"plt.figure(figsize=(12,4))\nplt.subplot(131)\nplt.plot(history.epoch, history.history[\"loss\"], label=\"Train loss\")\nplt.plot(history.epoch, history.history[\"val_loss\"], label=\"Valid loss\")\nplt.legend()\nplt.subplot(132)\nplt.plot(history.epoch, history.history[\"accuracy\"], label=\"Train accuracy\")\nplt.plot(history.epoch, history.history[\"val_accuracy\"], label=\"Valid accuracy\")\nplt.legend()\nplt.subplot(133)\nplt.plot(history.epoch, history.history[\"mean_iou\"], label=\"Train iou\")\nplt.plot(history.epoch, history.history[\"val_mean_iou\"], label=\"Valid iou\")\nplt.legend()\nplt.show()","metadata":{"trusted":true,"_uuid":"3666ba4cac9ed2c3029b824af220404bfcc16f23"},"outputs":[],"execution_count":null},{"cell_type":"code","source":"for i, (imgs, msks) in enumerate(valid_gen):\n    # predict batch of images\n    preds = model.predict(imgs)\n    # create figure\n    f, axarr = plt.subplots(8, 8, figsize=(20,15))\n    axarr = axarr.ravel()\n    axidx = 0\n    # loop through batch\n    for img, msk, pred in zip(imgs, msks, preds):\n        # plot image\n        axarr[axidx].imshow(img[:, :, 0])\n        # threshold true mask\n        comp = msk[:, :, 0] > 0.5\n        # apply connected components\n        comp = measure.label(comp)\n        # apply bounding boxes\n        predictionString = ''\n        for region in measure.regionprops(comp):\n            # retrieve x, y, height and width\n            y, x, y2, x2 = region.bbox\n            height = y2 - y\n            width = x2 - x\n            axarr[axidx].add_patch(patches.Rectangle((x,y),width,height,linewidth=2,edgecolor='b',facecolor='none'))\n        # threshold predicted mask\n        comp = pred[:, :, 0] > 0.5\n        # apply connected components\n        comp = measure.label(comp)\n        # apply bounding boxes\n        predictionString = ''\n        for region in measure.regionprops(comp):\n            # retrieve x, y, height and width\n            y, x, y2, x2 = region.bbox\n            height = y2 - y\n            width = x2 - x\n            axarr[axidx].add_patch(patches.Rectangle((x,y),width,height,linewidth=2,edgecolor='r',facecolor='none'))\n        axidx += 1\n    plt.show()\n    if (i > 5):\n        break","metadata":{"trusted":true,"_uuid":"fbbf7546d396560d21b7af17d4c959713f425d8e"},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Predict test images","metadata":{"_uuid":"25dc7ad848190bb37349a80f96ed2bdb5c3821b0"}},{"cell_type":"code","source":"# load and shuffle filenames\nfolder = '../input/stage_2_test_images'\ntest_filenames = os.listdir(folder)\nprint('n test samples:', len(test_filenames))\n\n# create test generator with predict flag set to True\ntest_gen = generator(folder, test_filenames, None, batch_size=25, image_size=256, shuffle=False, predict=True)\n\n# create submission dictionary\nsubmission_dict = {}\n# loop through testset\nfor imgs, filenames in test_gen:\n    # predict batch of images\n    preds = model.predict(imgs)\n    # loop through batch\n    for pred, filename in zip(preds, filenames):\n        # resize predicted mask\n        pred = resize(pred, (1024, 1024), mode='reflect')\n        # threshold predicted mask\n        comp = pred[:, :, 0] > 0.5\n        # apply connected components\n        comp = measure.label(comp)\n        # apply bounding boxes\n        predictionString = ''\n        for region in measure.regionprops(comp):\n            # retrieve x, y, height and width\n            y, x, y2, x2 = region.bbox\n            height = y2 - y\n            width = x2 - x\n            # proxy for confidence score\n            conf = np.mean(pred[y:y+height, x:x+width])\n            # add to predictionString\n            predictionString += str(conf) + ' ' + str(x) + ' ' + str(y) + ' ' + str(width) + ' ' + str(height) + ' '\n        # add filename and predictionString to dictionary\n        filename = filename.split('.')[0]\n        submission_dict[filename] = predictionString\n    # stop if we've got them all\n    if len(submission_dict) >= len(test_filenames):\n        break\n\n# save dictionary as csv file\nsub = pd.DataFrame.from_dict(submission_dict,orient='index')\nsub.index.names = ['patientId']\nsub.columns = ['PredictionString']\nsub.to_csv('submission.csv')","metadata":{"trusted":true,"_uuid":"2c9277e4ec9f12712dd690002c540b396278c504"},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true,"_uuid":"6b7bbc372fddde87f95660b79482d58137ff4ff3"},"outputs":[],"execution_count":null}]}