{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":19989,"databundleVersionId":1160143,"sourceType":"competition"}],"dockerImageVersionId":30918,"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)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\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","trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:54:29.027973Z","iopub.execute_input":"2025-03-15T16:54:29.028298Z","iopub.status.idle":"2025-03-15T16:54:37.409539Z","shell.execute_reply.started":"2025-03-15T16:54:29.028262Z","shell.execute_reply":"2025-03-15T16:54:37.408404Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip install torch torchvision","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:55:13.110982Z","iopub.execute_input":"2025-03-15T16:55:13.111305Z","iopub.status.idle":"2025-03-15T16:55:18.651886Z","shell.execute_reply.started":"2025-03-15T16:55:13.111279Z","shell.execute_reply":"2025-03-15T16:55:18.650546Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Standard library imports\nimport os  # For handling file paths\nimport random  # For generating random numbers\nfrom collections import Counter  # For counting hashable objects\n\n# Third-party imports\nimport numpy as np  # For numerical operations\nimport pandas as pd  # For data manipulation and analysis\nfrom PIL import Image, ImageDraw  # For image handling and drawing\nimport matplotlib.pyplot as plt  # For plotting\nfrom sklearn.model_selection import train_test_split  # For splitting data into training and testing sets\n\n# PyTorch imports\nimport torch  # For tensor operations and neural networks\nimport torchvision  # For computer vision tasks\n\n# Torchvision imports\nfrom torchvision import transforms as T  # For data transformations\nfrom torchvision.models.detection.faster_rcnn import FastRCNNPredictor  # For Faster R-CNN model\n\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:56:15.607929Z","iopub.execute_input":"2025-03-15T16:56:15.608384Z","iopub.status.idle":"2025-03-15T16:56:23.529449Z","shell.execute_reply.started":"2025-03-15T16:56:15.608354Z","shell.execute_reply":"2025-03-15T16:56:23.528282Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Load train data\n\ntrain = pd.read_csv(\"/kaggle/input/global-wheat-detection/train.csv\")\ntrain.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:57:35.039144Z","iopub.execute_input":"2025-03-15T16:57:35.039743Z","iopub.status.idle":"2025-03-15T16:57:35.383654Z","shell.execute_reply.started":"2025-03-15T16:57:35.039679Z","shell.execute_reply":"2025-03-15T16:57:35.382605Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#make a numeric values\ndf","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:59:18.880095Z","iopub.execute_input":"2025-03-15T16:59:18.880433Z","iopub.status.idle":"2025-03-15T16:59:18.897622Z","shell.execute_reply.started":"2025-03-15T16:59:18.880399Z","shell.execute_reply":"2025-03-15T16:59:18.896485Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":" coord = pd.DataFrame(list(train.bbox.apply(lambda x : x[1:-1].split(\",\")).values),columns=[\"x1\",\"y1\",\"w\",\"h\"])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:58:11.278103Z","iopub.execute_input":"2025-03-15T16:58:11.278537Z","iopub.status.idle":"2025-03-15T16:58:11.697597Z","shell.execute_reply.started":"2025-03-15T16:58:11.278507Z","shell.execute_reply":"2025-03-15T16:58:11.696651Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df = pd.concat([train,coord],axis=1)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T16:58:57.07231Z","iopub.execute_input":"2025-03-15T16:58:57.072677Z","iopub.status.idle":"2025-03-15T16:58:57.098643Z","shell.execute_reply.started":"2025-03-15T16:58:57.072647Z","shell.execute_reply":"2025-03-15T16:58:57.097765Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df['x1']=pd.to_numeric(df['x1'])\ndf['y1']=pd.to_numeric(df['y1'])\ndf['w']=pd.to_numeric(df['w'])\ndf['h']=pd.to_numeric(df['h'])","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:00:01.967239Z","iopub.execute_input":"2025-03-15T17:00:01.967649Z","iopub.status.idle":"2025-03-15T17:00:01.975291Z","shell.execute_reply.started":"2025-03-15T17:00:01.967614Z","shell.execute_reply":"2025-03-15T17:00:01.974182Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#calculate the y2,x2:\ndf['x2']=df['x1']+df['w']\ndf['y2']=df['y1']+df['h']","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:00:35.502969Z","iopub.execute_input":"2025-03-15T17:00:35.503304Z","iopub.status.idle":"2025-03-15T17:00:35.522173Z","shell.execute_reply.started":"2025-03-15T17:00:35.503279Z","shell.execute_reply":"2025-03-15T17:00:35.521106Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:00:56.349101Z","iopub.execute_input":"2025-03-15T17:00:56.349454Z","iopub.status.idle":"2025-03-15T17:00:56.371016Z","shell.execute_reply.started":"2025-03-15T17:00:56.349424Z","shell.execute_reply":"2025-03-15T17:00:56.369872Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Drop unneeded columns\ndf.drop(['bbox','width','height','w','h','source'],axis=1,inplace=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:01:29.300953Z","iopub.execute_input":"2025-03-15T17:01:29.30131Z","iopub.status.idle":"2025-03-15T17:01:29.319662Z","shell.execute_reply.started":"2025-03-15T17:01:29.301284Z","shell.execute_reply":"2025-03-15T17:01:29.318274Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:01:57.154785Z","iopub.execute_input":"2025-03-15T17:01:57.155208Z","iopub.status.idle":"2025-03-15T17:01:57.168471Z","shell.execute_reply.started":"2025-03-15T17:01:57.15518Z","shell.execute_reply":"2025-03-15T17:01:57.167278Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Take the unique ids of the images\nunique_imgs=df.image_id.unique()\nunique_imgs","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:02:35.463781Z","iopub.execute_input":"2025-03-15T17:02:35.464164Z","iopub.status.idle":"2025-03-15T17:02:35.482765Z","shell.execute_reply.started":"2025-03-15T17:02:35.464133Z","shell.execute_reply":"2025-03-15T17:02:35.481886Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#make custom class for preparing the data\n#/kaggle/input/global-wheat-detection/train/","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:04:17.517321Z","iopub.execute_input":"2025-03-15T17:04:17.517687Z","iopub.status.idle":"2025-03-15T17:04:17.52213Z","shell.execute_reply.started":"2025-03-15T17:04:17.517659Z","shell.execute_reply":"2025-03-15T17:04:17.520842Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Define a custom dataset class inheriting from torch.utils.data.Dataset\nclass custDat(torch.utils.data.Dataset):\n    def __init__(self, df, unique_imgs, indices):\n        \"\"\"\n        Initialize the dataset with a DataFrame, a list of unique image names, and indices.\n        \n        Args:\n            df (pd.DataFrame): DataFrame containing image IDs and bounding box information.\n            unique_imgs (list): List of unique image names.\n            indices (list): List of indices to be used for accessing the dataset.\n        \"\"\"\n        self.df = df  # DataFrame containing image and bounding box data\n        self.unique_imgs = unique_imgs  # List of unique image names\n        self.indices = indices  # Indices for accessing the images in the dataset\n    \n    def __len__(self):\n        \"\"\"\n        Return the length of the dataset.\n        \n        Returns:\n            int: Number of samples in the dataset.\n        \"\"\"\n        return len(self.indices)  # Length of the dataset based on the indices\n    \ndef __getitem__(self, idx):\n        \"\"\"\n        Get an item from the dataset at the specified index.\n        \n        Args:\n            idx (int): Index of the item to be fetched.\n        \n        Returns:\n            tuple: Tuple containing the image tensor and the target dictionary.\n        \"\"\"\n        # Get the image name using the index\n        image_name = self.unique_imgs[self.indices[idx]]\n        \n        # Get the bounding boxes for the image\n        boxes = self.df[self.df.image_id == image_name].values[:, 1:].astype(\"float\")\n        \n        # Open the image and convert it to RGB format\n        img = Image.open(\"../input/global-wheat-detection/train/\" + image_name + \".jpg\").convert('RGB')\n        \n        # Create labels tensor with value 1 for each bounding box\n        labels = torch.ones(boxes.shape[0], dtype=torch.int64)\n        \n        # Create the target dictionary containing boxes and labels\n        target = {}\n        target[\"boxes\"] = torch.tensor(boxes)  # Bounding boxes as a tensor\n        target[\"label\"] = labels  # Labels as a tensor\n        \n        # Return the image converted to a tensor and the target dictionary\n        return T.ToTensor()(img), target","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:06:22.712656Z","iopub.execute_input":"2025-03-15T17:06:22.713074Z","iopub.status.idle":"2025-03-15T17:06:22.720397Z","shell.execute_reply.started":"2025-03-15T17:06:22.713045Z","shell.execute_reply":"2025-03-15T17:06:22.71912Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#split the data int train and validation:\ntrain_inds , val_inds =train_test_split(range(unique_imgs.shape[0]),test_size=0.1)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:07:53.175732Z","iopub.execute_input":"2025-03-15T17:07:53.176072Z","iopub.status.idle":"2025-03-15T17:07:53.181587Z","shell.execute_reply.started":"2025-03-15T17:07:53.176046Z","shell.execute_reply":"2025-03-15T17:07:53.180566Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def custom_collate(data):\n    return data","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:08:08.711551Z","iopub.execute_input":"2025-03-15T17:08:08.711939Z","iopub.status.idle":"2025-03-15T17:08:08.71642Z","shell.execute_reply.started":"2025-03-15T17:08:08.711912Z","shell.execute_reply":"2025-03-15T17:08:08.715183Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#call the data loader to prepare it to the model:\ntrain_dl = torch.utils.data.DataLoader(custDat(df,unique_imgs,train_inds),\n                                       batch_size=16,\n                                       shuffle=True,\n                                       collate_fn=custom_collate,\n                                       pin_memory=True if torch.cuda.is_available() else False)\nval_dl = torch.utils.data.DataLoader(custDat(df,unique_imgs,val_inds),\n                                     batch_size=8,\n                                     shuffle=True,\n                                     collate_fn=custom_collate,\n                                     pin_memory=True if torch.cuda.is_available() else False)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:08:52.844497Z","iopub.execute_input":"2025-03-15T17:08:52.844868Z","iopub.status.idle":"2025-03-15T17:08:52.855675Z","shell.execute_reply.started":"2025-03-15T17:08:52.844839Z","shell.execute_reply":"2025-03-15T17:08:52.854514Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#Modelling\nmodel = torchvision.models.detection.fasterrcnn_resnet50_fpn(weights=True)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:09:30.949981Z","iopub.execute_input":"2025-03-15T17:09:30.950361Z","iopub.status.idle":"2025-03-15T17:09:33.054722Z","shell.execute_reply.started":"2025-03-15T17:09:30.950328Z","shell.execute_reply":"2025-03-15T17:09:33.0525Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"model","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:09:52.287669Z","iopub.execute_input":"2025-03-15T17:09:52.288166Z","iopub.status.idle":"2025-03-15T17:09:52.297399Z","shell.execute_reply.started":"2025-03-15T17:09:52.288133Z","shell.execute_reply":"2025-03-15T17:09:52.296387Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"num_classes=2","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:10:33.175469Z","iopub.execute_input":"2025-03-15T17:10:33.175854Z","iopub.status.idle":"2025-03-15T17:10:33.180196Z","shell.execute_reply.started":"2025-03-15T17:10:33.175825Z","shell.execute_reply":"2025-03-15T17:10:33.179059Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"in_features=model.roi_heads.box_predictor.cls_score.in_features\nmodel.roi_heads.box_predictor =  FastRCNNPredictor(in_features,num_classes)\nmodel","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:10:58.453496Z","iopub.execute_input":"2025-03-15T17:10:58.453892Z","iopub.status.idle":"2025-03-15T17:10:58.464367Z","shell.execute_reply.started":"2025-03-15T17:10:58.453858Z","shell.execute_reply":"2025-03-15T17:10:58.463406Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:11:27.14166Z","iopub.execute_input":"2025-03-15T17:11:27.142051Z","iopub.status.idle":"2025-03-15T17:11:27.146851Z","shell.execute_reply.started":"2025-03-15T17:11:27.142022Z","shell.execute_reply":"2025-03-15T17:11:27.14565Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"device","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:11:33.271598Z","iopub.execute_input":"2025-03-15T17:11:33.271958Z","iopub.status.idle":"2025-03-15T17:11:33.27824Z","shell.execute_reply.started":"2025-03-15T17:11:33.271931Z","shell.execute_reply":"2025-03-15T17:11:33.277218Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"optimizer = torch.optim.SGD(model.parameters(),lr=0.001,momentum=0.9,weight_decay=0.005)\nnum_epochs=5","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:11:54.289834Z","iopub.execute_input":"2025-03-15T17:11:54.290167Z","iopub.status.idle":"2025-03-15T17:11:54.295449Z","shell.execute_reply.started":"2025-03-15T17:11:54.290143Z","shell.execute_reply":"2025-03-15T17:11:54.294366Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"#train the model with 5 epochs and print the loss:","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"Debugging: d[1] =\", d[1], \"Type:\", type(d[1]))\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T18:20:21.591152Z","iopub.execute_input":"2025-03-15T18:20:21.592126Z","iopub.status.idle":"2025-03-15T18:20:21.62137Z","shell.execute_reply.started":"2025-03-15T18:20:21.592026Z","shell.execute_reply":"2025-03-15T18:20:21.619805Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"# Move the model to the specified device (CPU or GPU)\nmodel.to(device)\n\n# Loop over the number of epochs\nfor epoch in range(num_epochs):\n    epoch_loss = 0  # Initialize the loss for the current epoch\n    \n    # Loop over the data in the training DataLoader\n    for data in train_dl:\n        imgs = []  # List to store the images\n        targets = []  # List to store the target dictionaries\n        \n        # Loop over each data sample in the batch\n        for d in data:\n            # Append the image tensor to the imgs list and move it to the device\n            imgs.append(d[0].to(device))\n\n            # Debugging: Print structure of d[1]\n            print(\"Debugging: d[1] =\", d[1], \"Type:\", type(d[1]))\n\n            # Ensure d[1] is a dictionary before accessing keys\n            if isinstance(d[1], dict) and 'boxes' in d[1] and 'labels' in d[1]:\n                # Create a target dictionary for the current sample\n                targ = {}\n                # Move the bounding boxes tensor to the device\n                targ['boxes'] = d[1]['boxes'].to(device)\n                # Move the labels tensor to the device\n                targ['labels'] = d[1]['labels'].to(device)  # Fixed key from 'label' to 'labels'\n                \n                # Append the target dictionary to the targets list\n                targets.append(targ)\n            else:\n                raise ValueError(f\"Unexpected format in d[1]: {d[1]}\")\n        \n        # Perform a forward pass through the model and get the loss dictionary\n        loss_dict = model(imgs, targets)\n\n        # Sum all the losses in the loss dictionary to get the total loss\n        loss = sum(v for v in loss_dict.values())\n\n        # Add the loss for the current batch to the epoch loss, converting it to a numpy value\n        epoch_loss += loss.cpu().detach().numpy()\n\n        # Zero the gradients of the optimizer\n        optimizer.zero_grad()\n\n        # Backpropagate the loss\n        loss.backward()\n\n        # Update the model parameters\n        optimizer.step()\n    \n    # Print the total loss for the current epoch\n    print(f\"Epoch {epoch + 1} Loss: {epoch_loss}\")\n\n        \n         \n         \n        ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T18:21:16.887906Z","iopub.execute_input":"2025-03-15T18:21:16.888346Z","iopub.status.idle":"2025-03-15T18:21:16.938615Z","shell.execute_reply.started":"2025-03-15T18:21:16.888318Z","shell.execute_reply":"2025-03-15T18:21:16.936886Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"print(\"Debugging: d =\", d, \"Type:\", type(d))\n\n ","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:39:28.685663Z","iopub.execute_input":"2025-03-15T17:39:28.686091Z","iopub.status.idle":"2025-03-15T17:39:28.691353Z","shell.execute_reply.started":"2025-03-15T17:39:28.686052Z","shell.execute_reply":"2025-03-15T17:39:28.690152Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"from torch.utils.data import DataLoader\n\n# Example: Create DataLoader if it's missing\ndataset = MyDataset()  # Ensure this dataset class exists\ndataloader = DataLoader(dataset, batch_size=32, shuffle=True)\n\n# Now try looping through it\nfor batch in dataloader:\n    print(\"Batch content:\", batch)  # Debugging\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-03-15T17:41:27.709668Z","iopub.execute_input":"2025-03-15T17:41:27.710085Z","iopub.status.idle":"2025-03-15T17:41:27.730551Z","shell.execute_reply.started":"2025-03-15T17:41:27.71005Z","shell.execute_reply":"2025-03-15T17:41:27.729117Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}