code: def _test_unary_op(
      precision,
      device_id,
      op_func,
      value,
      expected_forward,
      expected_backward_all,
      op_param_dict={},
  ):
      value = AA(value, dtype=PRECISION_TO_TYPE[precision])
  
      a = C.input_variable(
          shape=value.shape,
          dtype=sanitize_dtype_cntk(PRECISION_TO_TYPE[precision]),
          needs_gradient=True,
          name="a",
      )
  
      # create batch
      value.shape = (1,) + value.shape
  
      if type(op_func) == str:
          input_op = eval("%s a" % op_func)
      else:
          input_op = op_func(a, **op_param_dict)
  
      forward_input = {a: value}
      expected_backward = (
          {
              a: expected_backward_all["arg"],
          }
          if expected_backward_all is not None
          else None
      )
      unittest_helper(
          input_op,
          forward_input,
          expected_forward,
          expected_backward,
          device_id=device_id,
          precision=precision,
      )
  
file_path: CNTK/bindings/python/cntk/ops/tests/ops_test_utils.py
imports: import os
  import numpy
  import cntk
  from cntk.tests.test_utils import *
  from cntk.device import cpu, gpu
  from ...ops.functions import Function
  from cntk.internal import sanitize_dtype_cntk
  from cntk.internal.utils import eval
  from ..None import constant
label_desc: Use image node_id 4 for calling a global function with example usage: _test_unary_op(precision, device_id, op_func, value, expected_forward, expected_backward_all, op_param_dict) without return types