code: def promote_dtypes(*args: ArrayLike) -> list[Array]:
      """Convenience function to apply Numpy argument dtype promotion."""
      # TODO(dougalm,mattjj): This is a performance bottleneck. Consider memoizing.
      if len(args) < 2:
          return [lax.asarray(arg) for arg in args]
      else:
          to_dtype, weak_type = dtypes._lattice_result_type(*args)
          to_dtype = dtypes.canonicalize_dtype(to_dtype, allow_extended_dtype=True)  # type: ignore[assignment]
          return [
              lax._convert_element_type(x, to_dtype, weak_type)
              for x in args
          ]
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  import re
  import textwrap
  from typing import Any, Callable, NamedTuple, TypeVar
  import warnings
  from jax._src import api
  from jax._src import config
  from jax._src import core
  from jax._src import dtypes
  from jax._src.lax import lax
  from jax._src.util import safe_zip, safe_map
  from jax._src.typing import Array, ArrayLike, DimSize, DType, DTypeLike, Shape
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: promote_dtypes() and returns: unknown, unknown