code: def test_changing_dropout_rate():
      from cntk import dropout, input
  
      resulted_non_zeros = 0
  
      shape = (100, 100)
      dtype = np.float32
      value = np.ones(shape=shape, dtype=dtype)
  
      a = input(shape=shape, needs_gradient=True, dtype=dtype)
      dropout_node = dropout(a, dropout_rate=0.1)
  
      value.shape = (1,) + value.shape
  
      for dropout_rate in [0.0, 0.25, 0.5, 0.78, 0.99999]:
          dropout_node.set_attribute("dropoutRate", dropout_rate)
          forward, _ = cntk_eval(
              dropout_node, {a: value}, dtype, backward_pass=True
          )
          resulted_non_zeros = np.count_nonzero(
              forward[dropout_node.output]
          )
          if dropout_rate == 0:
              assert resulted_non_zeros == value.size
  
          assert np.isclose(
              (1 - dropout_rate),
              resulted_non_zeros * 1.0 / value.size,
              atol=0.01,
          )
  
imports: from __future__ import division
  import numpy
  import cntk
  import pytest
  from .ops_test_utils import unittest_helper, _test_unary_op, _test_binary_op, AA, precision, PRECISION_TO_TYPE, cntk_device
  from cntk.tests.test_utils import TOLERANCE_ABSOLUTE
  from cntk.internal.utils import eval
  from cntk.internal import sanitize_dtype_cntk
  from ..None import constant
  from cntk.variables import Parameter, Constant
label_desc: Use image node_id 8 for calling a global function with example usage: test_changing_dropout_rate() without return types