code: def minimum(nd1, nd2):
      """Compares elements at corresponding indexes in arrays
      and returns an array of the minimum element found
      at each compared index.
  
      If an array element being compared has the value NaN,
      the minimum for that index will be NaN.
  
      Examples
      --------
      >>> a = hl.nd.array([1, 5, 3])
      >>> b = hl.nd.array([2, 3, 4])
      >>> hl.eval(hl.nd.minimum(a, b))
      array([1, 3, 3], dtype=int32)
      >>> a = hl.nd.array([hl.float64(float("NaN")), 5.0, 3.0])
      >>> b = hl.nd.array([2.0, 3.0, hl.float64(float("NaN"))])
      >>> hl.eval(hl.nd.minimum(a, b))
      array([nan, 3., nan])
  
      Parameters
      ----------
      nd1 : :class:`.NDArrayExpression`
      nd2 : class:`.NDArrayExpression`, `.ArrayExpression`, numpy ndarray, or nested python lists/tuples.
          nd1 and nd2 must be the same shape or broadcastable into common shape. Nd1 and nd2 must
          have elements of comparable types
  
      Returns
      -------
      min_array : :class:`.NDArrayExpression`
          Element-wise minimums of nd1 and nd2. If nd1 has the same shape as nd2, the resulting array
          will be of that shape. If nd1 and nd2 were broadcasted into a common shape, resulting array
          will be of that shape
  
      """
  
      if (nd1.dtype.element_type or nd2.dtype.element_type) == (
          tfloat64 or tfloat32
      ):
          return nd1.map2(
              nd2,
              lambda a, b: hl.if_else(
                  hl.is_nan(a) | hl.is_nan(b),
                  hl.float64(float("NaN")),
                  hl.if_else(a < b, a, b),
              ),
          )
      return nd1.map2(nd2, lambda a, b: hl.if_else(a < b, a, b))
  
imports: from functools import reduce
  import hail
  from hail.expr.functions import _ndarray
  from hail.expr.functions import array
  from hail.expr.types import HailType, tfloat64, tfloat32, ttuple, tndarray
  from hail.typecheck import typecheck, nullable, oneof, tupleof, sequenceof
  from hail.expr.expressions import expr_int32, expr_int64, expr_tuple, expr_any, expr_array, expr_ndarray, expr_numeric, Int64Expression, cast_expr, construct_expr, expr_bool, unify_all
  from hail.expr.expressions.typed_expressions import NDArrayNumericExpression
  from hail.ir import NDArrayQR, NDArrayInv, NDArrayConcat, NDArraySVD, NDArrayEigh, Apply
label_desc: Use image node_id 21 for calling a global function with example usage: minimum(nd1, nd2) and returns: nd1, nd1