code: def _assert_parameter_valid(
      validate_args, x, lower_bound, upper_bound, message
  ):
      """Helper to check that the input parameter is valid."""
      if validate_args:
          with tf.control_dependencies(
              [
                  tf.debugging.assert_greater_equal(
                      x, lower_bound, message=message
                  ),
                  tf.debugging.assert_less_equal(
                      x, upper_bound, message=message
                  ),
              ]
          ):
              return tf.identity(x)
      else:
          return x
  
imports: from typing import Callable, Tuple
  import tensorflow.compat.v2
  from tf_quant_finance import black_scholes
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.black_scholes.implied_vol_utils import UnderlyingDistribution
  from tf_quant_finance.math import make_val_and_grad_fn
  from tf_quant_finance.math import optimizer
  from tf_quant_finance.models.sabr import approximations
  from tf_quant_finance.models.sabr.approximations.implied_volatility import SabrApproximationType
  from tf_quant_finance.models.sabr.approximations.implied_volatility import SabrImpliedVolatilityType
label_desc: Use image node_id 7 for calling a global function with example usage: _assert_parameter_valid(validate_args, x, lower_bound, upper_bound, message) and returns: x, tf