code: def result_type(*dtypes):
      """Returns the type from applying the Keras type promotion rules.
  
      In general, each argument is first parsed by `backend.standardize_dtype`,
      and the resulting dtype is determined by the least upper bound of the type
      promotion lattice.
  
      Note: This function attempts to match the result of `jnp.result_type`.
  
      Args:
          dtypes: Input dtypes.
  
      Returns:
          The result dtype.
  
      Examples:
  
      >>> x = keras.ops.ones((1,), dtype="bfloat16")
      >>> keras.backend.result_type(x.dtype, int)
      "bfloat16"
  
      >>> x = keras.ops.ones((1,), dtype="int32")
      >>> y = keras.ops.ones((1,), dtype="float32")
      >>> keras.backend.result_type(x.dtype, y.dtype)
      "float32"
      """
      if len(dtypes) == 0:
          # If no dtypes provided, default to floatx, this matches
          # `ops.convert_to_tensor([])`
          return backend.floatx()
      return _lattice_result_type(
          *(backend.floatx() if arg is None else arg for arg in dtypes),
      )
  
file_path: keras/keras/backend/common/dtypes.py
imports: import functools
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend.common.variables import ALLOWED_DTYPES
  from keras.backend.common.variables import standardize_dtype
label_desc: Use image node_id 8 for calling a global function with example usage: result_type() and returns: _lattice_result_type, backend