code: def min_max_bwd(x, f, dtype):
      forward_array = np.asarray(f, dtype=dtype)
      min_max_elements = forward_array.reshape(
          forward_array.size
      ).tolist()
      # place 1.0s where minimum or maximum elements are
      backward = np.zeros_like(x)
      for element in min_max_elements:
          backward += np.asarray(x == element)
      return backward
  
imports: from __future__ import division
  import numpy
  import itertools
  import pytest
  import cntk
  from .ops_test_utils import unittest_helper, _test_unary_op, AA, precision, PRECISION_TO_TYPE, constant
  from cntk.internal import sanitize_dtype_cntk
  from ..None import reduce_sum, reduce_max, reduce_min, reduce_mean, reduce_log_sum_exp, reduce_prod
label_desc: Use image node_id 9 for calling a global function with example usage: min_max_bwd(x, f, dtype) and returns: backward