code: def _fft2_norm(
      x: Union[tf.Tensor, tf.Variable],
      s: Optional[Sequence[int]] = None,
      dim: Sequence[int] = (-2, -1),
      norm: str = "backward",
  ):
      n = tf.constant(s[0] * s[1], dtype=x.dtype)
      if norm == "backward":
          return x
      elif norm == "ortho":
          return x / tf.sqrt(n)
      elif norm == "forward":
          return x / n
      else:
          raise ivy.utils.exceptions.IvyError(
              f"Unrecognized normalization mode {norm}"
          )
  
imports: import math
  from typing import Union, Optional, Tuple, List, Literal, Sequence, Callable
  import tensorflow
  from ivy.func_wrapper import inputs_to_ivy_arrays, output_to_native_arrays, with_unsupported_dtypes, with_supported_dtypes, with_supported_device_and_dtypes
  from ..None import backend_version
  import ivy
  from ivy.functional.ivy.layers import _handle_padding, _get_num_padded_values, _validate_max_pool_params, _depth_max_pooling_helper
  from ivy.functional.ivy.experimental.layers import _padding_ceil_mode, _get_size
label_desc: Use image node_id 22 for calling a global function with example usage: _fft2_norm(x, s, dim, norm) and returns: x, unknown, unknown