# I need a couple of images of positive and negative class members for my poster import xarray as xr import numpy as np import matplotlib.pyplot as plt import torch as th # Dataset is a torch dataset def get_image(dataset, idx): img = dataset[idx][0].numpy() return img def plot_image(img, path): plt.imshow(img) plt.savefig(path) def get_random_positive_image(dataset): idx =