def _extend_support(self, x, f, alt):
<EOL>scale = self.scale + tf.zeros_like(self.concentration)<EOL>is_invalid = x < scale<EOL>scale = scale + tf.zeros_like(x)<EOL>x = x + tf.zeros_like(scale)<EOL>y = f(tf.where(is_invalid, scale, x))<EOL>if alt == <NUM_LIT:0.>:<EOL><INDENT>alt = tf.zeros_like(y)<EOL><DEDENT>elif alt == <NUM_LIT:1.>:<EOL><INDENT>alt = tf.ones_like(y)<EOL><DEDENT>else:<EOL><INDENT>alt = tf.fill(<EOL>dims=tf.shape(input=y),<EOL>value=dtype_util.as_numpy_dtype(self.dtype)(alt))<EOL><DEDENT>return tf.where(is_invalid, alt, y)<EOL>
Returns `f(x)` if x is in the support, and `alt` otherwise.

        Given `f` which is defined on the support of this distribution
        (e.g. x > scale), extend the function definition to the real line
        by defining `f(x) = alt` for `x < scale`.

        Args:
          x: Floating-point Tensor to evaluate `f` at.
          f: Lambda that takes in a tensor and returns a tensor. This represents
            the function who we want to extend the domain of definition.
          alt: Python or numpy literal representing the value to use for extending
            the domain.
        Returns:
          Tensor representing an extension of `f(x)`.