code: def triangular(left, mode, right, size=None):
      if left > mode or mode > right or left == right:
          raise ivy.utils.exceptions.IvyValueError(
              "left < mode < right is not being followed"
          )
      u = ivy.random_uniform(
          low=0.0, high=1.0, shape=size, dtype="float64"
      )
      condition = u <= (mode - left) / (right - left)
      values1 = (
          left
          + (right - left) * (u * (mode - left) / (right - left)) ** 0.5
      )
      values2 = (
          right
          - (right - mode)
          * ((1 - u) * (right - mode) / (right - left)) ** 0.5
      )
      return ivy.where(condition, values1, values2)
  
imports: import ivy
  from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar
  from ivy import with_supported_dtypes
label_desc: Use image node_id 30 for calling a global function with example usage: triangular(left, mode, right, size) and returns: ivy