code: def prelu(
      x: Union[ivy.NativeArray, ivy.Array],
      slope: Union[float, ivy.NativeArray, ivy.Array],
      /,
      *,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """Prelu takes input data (Array) and slope array as input,
  
      and produces one output data (array) where the function
      f(x) = slope * x for x < 0, f(x) = x for x >= 0., is applied
      to the data array elementwise. This operator supports unidirectional
      broadcasting (array slope should be unidirectional broadcastable to
      input tensor X);
  
      Parameters
      ----------
      x
          Input Array.
      slope
          Slope Array. The shape of slope can be smaller then first input X;
          if so, its shape must be unidirectional broadcastable to X.
      out
          Optional output array.
  
      Returns
      -------
      ret
           Array containing Parametrized relu values.
      """
      try:
          return ivy.where(x > 0, x, x * slope, out=out)
      except ivy.utils.exceptions.IvyError(
          f"The shape {slope.shape} is not Unidirectional Broadcastable\n"
          "as per ONNX standards"
      ) as IvyException:
          if len(slope.shape) == 1:
              dim = slope.shape[0]
              new_shape = []
              n = 0
              for d in x.shape:
                  if d == dim:
                      n += 1
                  new_shape.append(d)
              if n == 1:
                  xs = x * slope.reshape(tuple(new_shape), out=out)
                  return ivy.where(x > 0, x, xs, out=out)
          raise IvyException
  
imports: from typing import Union, Optional, Callable, Literal
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.utils.exceptions import handle_exceptions
  from ivy.func_wrapper import handle_array_function, handle_nestable, to_native_arrays_and_back, handle_array_like_without_promotion, handle_out_argument, inputs_to_ivy_arrays, handle_device, handle_backend_invalid, handle_complex_input
label_desc: Use image node_id 3 for calling a global function with example usage: prelu() and returns: ivy, ivy