code: def ref_activation(x, nonlinearity, nonlinearity_args):
      if nonlinearity == "identity" or not nonlinearity:
          return x
      elif nonlinearity == "relu":
          return F.relu(x)
      elif nonlinearity == "sigmoid":
          return F.sigmoid(x)
      elif nonlinearity == "tanh":
          return F.tanh(x)
      elif nonlinearity == "leaky_relu":
          return F.leaky_relu(x, nonlinearity_args[0])
      elif nonlinearity == "elu":
          return F.elu(x, nonlinearity_args[0])
      elif nonlinearity == "relu6":
          return F.relu6(x)
      raise ValueError(
          "unknown nonlinearity type {}".format(nonlinearity)
      )
  
file_path: nnabla/python/test/function/test_fused_convolution.py
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.ext_utils
  from nbla_test_utils import list_context
label_desc: Use image node_id 1 for calling a global function with example usage: ref_activation(x, nonlinearity, nonlinearity_args) and returns: x, F, F, F, F, F, F