def _eigh(operand: TfVal, lower: bool, _in_avals, _out_aval):
    if (operand.shape[(- 1)] == 0):
        (v, w) = (operand, tf.reshape(operand, _eval_shape(_in_avals[0].shape[:(- 1)])))
    else:
        if (not lower):
            operand = tf.linalg.adjoint(operand)
        (w, v) = tf.linalg.eigh(operand)
    cast_type = {tf.complex64: tf.float32, tf.complex128: tf.float64}.get(operand.dtype)
    if (cast_type is not None):
        w = tf.cast(w, cast_type)
    return (v, w)
def _eigh(operand: TfVal, lower: bool, _in_avals, _out_aval):
    if (operand.shape[(- 1)] == 0):
        (v, w) = (operand, tf.reshape(operand, _eval_shape(_in_avals[0].shape[:(- 1)])))
    else:
        if (not lower):
            operand = tf.linalg.adjoint(operand)
        (w, v) = tf.linalg.eigh(operand)
    cast_type = {tf.complex64: tf.float32, tf.complex128: tf.float64}.get(operand.dtype)
    if (cast_type is not None):
        w = tf.cast(w, cast_type)
    return (v, w)