code: def _eigh(a, xp):
      if xp not in _xp_supports_batch_eigh:
          try:
              xp.linalg.eigh(xp.ones((2, 2, 2), xp.float32))
          except ValueError:
              _xp_supports_batch_eigh[xp] = False
          else:
              _xp_supports_batch_eigh[xp] = True
      if _xp_supports_batch_eigh[xp]:
          return xp.linalg.eigh(a)
      ws = []
      vs = []
      for ai in a:
          w, v = xp.linalg.eigh(ai)
          ws.append(w)
          vs.append(v)
      return xp.stack(ws), xp.stack(vs)
  
imports: import numpy
  from chainer import backend
  from chainer import function_node
  from chainer.utils import argument
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: _eigh(a, xp) and returns: xp,  xp, xp