code: def call_nn_op(op):
      """
      a helper function that adds appropriate parameters when calling
      an nn module representing an operation like Softmax
  
      :param op: the nn.Module operation to instantiate
      :return: instantiation of the op module with appropriate parameters
      """
      if op in [nn.Softmax, nn.LogSoftmax]:
          return op(dim=1)
      else:
          return op()
  
imports: from inspect import isclass
  import torch
  import torch.nn
  from pyro.distributions.util import broadcast_shape
label_desc: Use image node_id 1 for calling a global function with example usage: call_nn_op(op) and returns: op, op