code: def _solve(a, b):
      from ..linalg.linalg import (
          _makearray,
          _assert_stacked_2d,
          _assert_stacked_square,
          _commonType,
          isComplexType,
          get_linalg_error_extobj,
          _raise_linalgerror_singular,
      )
      from ..linalg import _umath_linalg
  
      a, _ = _makearray(a)
      _assert_stacked_2d(a)
      _assert_stacked_square(a)
      b, wrap = _makearray(b)
      t, result_t = _commonType(a, b)
  
      # This part is different from np.linalg.solve
      if b.ndim == 1:
          gufunc = _umath_linalg.solve1
      else:
          gufunc = _umath_linalg.solve
  
      # This does nothing currently but is left in because it will be relevant
      # when complex dtype support is added to the spec in 2022.
      signature = "DD->D" if isComplexType(t) else "dd->d"
      with np.errstate(
          call=_raise_linalgerror_singular,
          invalid="call",
          over="ignore",
          divide="ignore",
          under="ignore",
      ):
          r = gufunc(a, b, signature=signature)
  
      return wrap(r.astype(result_t, copy=False))
  
imports: from __future__ import annotations
  from ._dtypes import _floating_dtypes, _numeric_dtypes, float32, float64, complex64, complex128
  from ._manipulation_functions import reshape
  from ._array_object import Array
  from ..core.numeric import normalize_axis_tuple
  from typing import TYPE_CHECKING
  from typing import NamedTuple
  import numpy.linalg
  import numpy
label_desc: Use image node_id 17 for calling a global function with example usage: _solve(a, b) and returns: wrap