code: def requires_grad_(
      model: torch.nn.Module, requires_grad: bool
  ) -> None:
      for param in model.parameters():
          param.requires_grad_(requires_grad)
  
imports: import json
  import pickle
  import random
  import torch
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from typing import Iterator
  from gluonts.dataset.common import DataEntry, Dataset, ListDataset
label_desc: Use image node_id 2 for calling a global function with example usage: requires_grad_(model, requires_grad) without return types