def check_arg_in_support(f):
  """
  """
  @functools.wraps(f)
  def _check_arg_and_apply_f(*args, **kwargs):
    dist = args[0]
    x = args[1]
    with tf.control_dependencies([
        assert_util.assert_greater_equal(
            x, dist.loc, message="x is not in the support of the distribution")
    ] if dist.validate_args else []):
      return f(*args, **kwargs)
  return _check_arg_and_apply_f