code: def _trainable(param: torch.Tensor) -> bool:
      return param.requires_grad
  
imports: from collections import deque
  import contextlib
  import functools
  from itertools import chain
  import logging
  from typing import Any, Callable, Deque, Dict, Generator, List, Optional, Union
  import torch
  from torch import nn
  from torch.autograd import Variable
  import torch.autograd.profiler
  import torch.distributed
  from fairscale.internal.params import Workhandle, get_global_rank
  from fairscale.nn.misc import GradBucket
  from fairscale.optim import OSS
label_desc: Use image node_id 1 for calling a global function with example usage: _trainable(param) and returns: param