code: def nanmin(
      a: Union[tf.Tensor, tf.Variable],
      /,
      *,
      axis: Optional[Union[int, Tuple[int]]] = None,
      keepdims: Optional[bool] = False,
      initial: Optional[Union[int, float, complex]] = None,
      where: Optional[Union[tf.Tensor, tf.Variable]] = None,
      out: Optional[Union[tf.Tensor, tf.Variable]] = None,
  ) -> Union[tf.Tensor, tf.Variable]:
      axis = tuple(axis) if isinstance(axis, list) else axis
      nan_mask = tf.math.is_nan(a)
      if where is not None:
          nan_mask = tf.math.logical_or(
              nan_mask, tf.math.logical_not(where)
          )
  
      masked_tensor = tf.where(
          nan_mask, tf.constant(float("inf"), dtype=a.dtype), a
      )
  
      if axis is None:
          result = tf.math.reduce_min(masked_tensor, keepdims=keepdims)
      else:
          result = tf.math.reduce_min(
              masked_tensor, axis=axis, keepdims=keepdims
          )
      if initial is not None:
          result = tf.minimum(result, initial)
      return result
  
imports: from typing import Union, Optional, Tuple, Sequence
  import tensorflow
  from tensorflow.python.ops.numpy_ops import np_math_ops
  import ivy
  from ivy import with_unsupported_dtypes, with_supported_dtypes, with_supported_device_and_dtypes
  from ..None import backend_version
  from copy import deepcopy
label_desc: Use image node_id 4 for calling a global function with example usage: nanmin() and returns: result