code: def extract_params_set_grad(model, zero_fill):
      if zero_fill:
          return [
              param
              for _, param in sorted(model.namedparams())
              if param.data is not None
          ]
      else:
          return [
              param
              for _, param in sorted(model.namedparams())
              if param.data is not None and param.grad is not None
          ]
  
imports: import ctypes
  import mpi4py.MPI
  import numpy
  from chainermn.communicators import _communication_utility
  import chainer.backends
  import chainerx
label_desc: Use image node_id 3 for calling a global function with example usage: extract_params_set_grad(model, zero_fill) and returns: unknown, unknown