code: def _validate_args_control_deps(
      prices,
      forwards,
      strikes,
      expiries,
      discount_factors,
      is_call_options,
  ):
      """Returns assertions for no-arbitrage conditions on the prices."""
      epsilon = tf.convert_to_tensor(1e-8, dtype=prices.dtype)
      forwards_positive = tf.debugging.assert_positive(
          forwards, message="Forwards positive"
      )
      strikes_positive = tf.debugging.assert_positive(
          strikes, message="Strikes positive"
      )
      expiries_positive = tf.debugging.assert_non_negative(
          expiries, message="Expiries positive"
      )
      put_lower_bounds = tf.nn.relu(strikes - forwards)
      call_lower_bounds = tf.nn.relu(forwards - strikes)
      if is_call_options is not None:
          is_call_options = tf.convert_to_tensor(
              is_call_options, dtype=tf.bool, name="is_call_options"
          )
          lower_bounds = tf.where(
              is_call_options, x=call_lower_bounds, y=put_lower_bounds
          )
          upper_bounds = tf.where(
              is_call_options, x=forwards, y=strikes
          )
      else:
          lower_bounds = call_lower_bounds
          upper_bounds = forwards
  
      undiscounted_prices = prices / discount_factors
      bounds_satisfied = [
          tf.debugging.assert_less_equal(
              lower_bounds,
              undiscounted_prices,
              message="Price lower bound",
          ),
          tf.debugging.assert_greater_equal(
              upper_bounds,
              undiscounted_prices,
              message="Price upper bound",
          ),
      ]
      not_too_close_to_bounds = [
          tf.debugging.assert_greater(
              tf.math.abs(undiscounted_prices - lower_bounds),
              epsilon,
              message="Close to lower bound",
          ),
          tf.debugging.assert_greater(
              tf.math.abs(undiscounted_prices - upper_bounds),
              epsilon,
              message="Close to upper bound",
          ),
      ]
      return (
          [expiries_positive, forwards_positive, strikes_positive]
          + bounds_satisfied
          + not_too_close_to_bounds
      )
  
imports: import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_args_control_deps(prices, forwards, strikes, expiries, discount_factors, is_call_options) and returns: unknown