code: def stochastic_depth_test(seed, training):
      np.random.seed(seed)
      tf.random.set_seed(seed)
  
      survival_probability = 0.5
  
      shortcut = np.asarray([[0.2, 0.1, 0.4]]).astype(np.float32)
      residual = np.asarray([[0.2, 0.4, 0.5]]).astype(np.float32)
  
      if training:
          if seed == _KEEP_SEED:
              # shortcut + residual
              expected_output = np.asarray([[0.4, 0.5, 0.9]]).astype(
                  np.float32
              )
          elif seed == _DROP_SEED:
              # shortcut
              expected_output = np.asarray([[0.2, 0.1, 0.4]]).astype(
                  np.float32
              )
      else:
          # shortcut + p_l * residual
          expected_output = np.asarray([[0.3, 0.3, 0.65]]).astype(
              np.float32
          )
  
      test_utils.layer_test(
          StochasticDepth,
          kwargs={"survival_probability": survival_probability},
          input_data=[shortcut, residual],
          expected_output=expected_output,
      )
  
file_path: addons/tensorflow_addons/layers/tests/stochastic_depth_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.layers.stochastic_depth import StochasticDepth
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: stochastic_depth_test(seed, training) without return types