code: def _fft_norm(s: Array, func_name: str, norm: str) -> Array:
      if norm == "backward":
          return jnp.array(1)
      elif norm == "ortho":
          return (
              ufuncs.sqrt(reductions.prod(s))
              if func_name.startswith("i")
              else 1 / ufuncs.sqrt(reductions.prod(s))
          )
      elif norm == "forward":
          return (
              reductions.prod(s)
              if func_name.startswith("i")
              else 1 / reductions.prod(s)
          )
      raise ValueError(
          f'Invalid norm value {norm}; should be "backward",'
          '"ortho" or "forward".'
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import operator
  import numpy
  from jax import dtypes
  from jax import lax
  from jax._src.lib import xla_client
  from jax._src.util import safe_zip
  from jax._src.numpy.util import check_arraylike, _wraps
  from jax._src.numpy import lax_numpy
  from jax._src.numpy import ufuncs, reductions
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 1 for calling a global function with example usage: _fft_norm(s, func_name, norm) and returns: jnp, unknown, unknown