code: def orthogonal(key, n, shape=(), dtype=None):
      seed = _get_seed(key)
      flat_shape = (n, n)
      if shape:
          flat_shape = shape + flat_shape
  
      # Generate a random matrix with the given shape and dtype
      random_matrix = ivy.random_uniform(
          seed=seed, shape=flat_shape, dtype=dtype
      )
  
      # Compute the QR decomposition of the random matrix
      q, _ = ivy.linalg.qr(random_matrix)
  
      # Reshape the resulting orthogonal matrix to the desired shape
      if shape:
          q = ivy.reshape(q, shape + (n, n))
  
      return q
  
imports: import operator
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back, handle_jax_dtype
label_desc: Use image node_id 21 for calling a global function with example usage: orthogonal(key, n, shape, dtype) and returns: q