code: def max(
      x: Union[tf.Tensor, tf.Variable],
      /,
      *,
      axis: Optional[Union[int, Sequence[int]]] = None,
      keepdims: bool = False,
      out: Optional[Union[tf.Tensor, tf.Variable]] = None,
  ) -> Union[tf.Tensor, tf.Variable]:
      if "complex" in str(x.dtype):
          real = tf.math.real(x)
          img = tf.math.imag(x)
          const = tf.constant(1j, dtype=x.dtype)
          real_max = tf.reduce_max(real, axis=axis, keepdims=keepdims)
          imag = tf.where(
              real == real_max,
              img,
              tf.experimental.numpy.finfo(img.dtype).min,
          )
          # we consider the number with the biggest real and imag part
          img_max = tf.reduce_max(imag, axis=axis, keepdims=keepdims)
          img_max = tf.cast(img_max, x.dtype)
          return tf.add(
              tf.cast(real_max, x.dtype), tf.multiply(img_max, const)
          )
      axis = tuple(axis) if isinstance(axis, list) else axis
      return tf.math.reduce_max(x, axis=axis, keepdims=keepdims)
  
file_path: ivy/ivy/functional/backends/tensorflow/statistical.py
imports: import tensorflow
  from typing import Union, Optional, Sequence
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
  from ivy.utils.einsum_parser import legalise_einsum_expr
label_desc: Use image node_id 2 for calling a global function with example usage: max() and returns: tf, tf