code: def has_grad(model: nn.Module):
      """Helper method to check if a model has `requires_grad` set to True"""
      has_grad_ = False
      for param in model.parameters():
          if param.requires_grad == True:
              has_grad_ = True
              break
      return has_grad_
  
imports: import copy
  import unittest
  import torch
  import torch.nn
  from lightly.models import utils
  from lightly.models.utils import _no_grad_trunc_normal, activate_requires_grad, batch_shuffle, batch_unshuffle, deactivate_requires_grad, nearest_neighbors, normalize_weight, update_momentum
label_desc: Use image node_id 1 for calling a global function with example usage: has_grad(model) and returns: has_grad_