code: def test_op_squared_error(
      output_vector, target_vector, device_id, precision
  ):
      dt = PRECISION_TO_TYPE[precision]
  
      o = AA(output_vector, dtype=dt)
      t = AA(target_vector, dtype=dt)
  
      expected_forward = AA([np.sum((t - o) ** 2)])
  
      backward = 2 * np.subtract(o, t)
      expected_backward = {
          "left_arg": [backward],
          "right_arg": [-1 * backward],
      }
  
      from cntk.losses import squared_error
  
      _test_binary_op(
          precision,
          device_id,
          squared_error,
          output_vector,
          target_vector,
          expected_forward,
          expected_backward,
      )
  
file_path: CNTK/bindings/python/cntk/losses/tests/losses_test.py
imports: from __future__ import division
  import numpy
  import pytest
  import cntk
  from cntk.ops.tests.ops_test_utils import _test_binary_op, AA, precision, PRECISION_TO_TYPE, unittest_helper
label_desc: Use image node_id 3 for calling a global function with example usage: test_op_squared_error(output_vector, target_vector, device_id, precision) without return types