code: def gev_constraint(loc, scale, conc):
      """Maps `s` to support based on `loc`, `scale` and `conc`."""
  
      def constrain(x):
          c = tf.convert_to_tensor(conc)
          # We intentionally compute the endpoint with (1.0 / concentration) * scale,
          # for the same reason as in GeneralizedExtremeValueCDF._maybe_assert_valid_x
          endpoint = loc - (1.0 / c) * scale
          return tf.where(
              c > 0.0,
              tf.math.softplus(x) + endpoint,
              tf.where(
                  tf.equal(0.0, c), x, endpoint - tf.math.softplus(x)
              ),
          )
  
      return constrain
  
imports: import collections
  import inspect
  from absl import logging
  import hypothesis.strategies
  import tensorflow.compat.v2
  from tensorflow_probability.python import bijectors
  from tensorflow_probability.python.distributions import lkj
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 12 for calling a global function with example usage: gev_constraint(loc, scale, conc) and returns: constrain, tf