text: import io, math, os, shutil, random, re, sys, struct, threading, time, gc, copy
  import PIL, pickle
  
  import numpy as np
  import pandas as pd
  
  from tqdm import tqdm
  from collections import defaultdict
  from functools import partial
  
  import torch
  import torch.nn as nn
  import torch.nn.functional as F
  import torch.optim as optim
  from torch.autograd import Variable
  from torch.utils.data import Dataset
  import torchvision
  import torchvision.transforms as transforms
  
  import matplotlib.pyplot as plt
  import seaborn as sns
  sns.set(style="darkgrid")