code: def get_ag_news(num_samples):
      # reading the input
      td.AG_NEWS(root="data", split=("train", "test"))
      train_csv_path = "data/AG_NEWS/train.csv"
      return (
          pd.read_csv(
              train_csv_path,
              usecols=[0, 2],
              names=["label", "description"],
          )
          .assign(
              label=lambda df: df["label"] - 1
          )  # make labels zero-based
          .sample(n=num_samples)
      )
  
imports: import math
  import os
  import lightning
  import pandas
  import torch
  import torch.nn.functional
  import torchtext.datasets
  from lightning.pytorch.callbacks import EarlyStopping, LearningRateMonitor, ModelCheckpoint
  from lightning.pytorch.cli import LightningCLI
  from sklearn.datasets import fetch_20newsgroups
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import train_test_split
  from torch import nn
  from torch.utils.data import DataLoader
  from torch.utils.data.dataset import random_split
  from torchdata.datapipes.iter import IterDataPipe
  from torchtext.data.functional import to_map_style_dataset
  from torchtext.datasets import AG_NEWS
  from transformers import BertModel, BertTokenizer
  import mlflow.pytorch
label_desc: Use image node_id 2 for calling a global function with example usage: get_ag_news(num_samples) and returns: pd