code: def train_100_grad_steps(data, device, net, optimiser):
      global_step = load(net, optimiser)
      for x_train_batch, y_train_batch in data:
          global_step += 1
          optimiser.zero_grad()
          net.train()
          _, forecast = net(
              torch.tensor(x_train_batch, dtype=torch.float).to(device)
          )
          loss = F.mse_loss(
              forecast,
              torch.tensor(y_train_batch, dtype=torch.float).to(device),
          )
          loss.backward()
          optimiser.step()
          # if global_step % 30 == 0:
          #     print(f'grad_step = {str(global_step).zfill(6)}, tr_loss = {loss.item():.6f}, te_loss = ')
          if global_step > 0 and global_step % 100 == 0:
              with torch.no_grad():
                  save(net, optimiser, global_step)
              break
  
imports: import numpy
  import pandas
  from numpy import matrix
  from scipy import linalg
  from matplotlib.pylab import rcParams
label_desc: Use image node_id 3 for calling a global function with example usage: train_100_grad_steps(data, device, net, optimiser) without return types