def _delta_te(in_values, te1=None, te2=None):
    """Read :math:`\\Delta_	ext{TE}` from BIDS metadata dict"""
    if isinstance(in_values, float):
        te2 = in_values
        te1 = 0.0
    if isinstance(in_values, dict):
        te1 = in_values.get('EchoTime1')
        te2 = in_values.get('EchoTime2')
        if not all((te1, te2)):
            te2 = in_values.get('EchoTimeDifference')
            te1 = 0
    if isinstance(in_values, list):
        te2, te1 = in_values
        if isinstance(te1, list):
            te1 = te1[1]
        if isinstance(te2, list):
            te2 = te2[1]
    if te1 is None and te2 is None:
        raise RuntimeError(
            'EchoTime1 and EchoTime2 metadata fields not found. Please consult the BIDS specification.'
            )
    if te1 is None:
        raise RuntimeError(
            'EchoTime1 metadata field not found. Please consult the BIDS specification.'
            )
    if te2 is None:
        raise RuntimeError(
            'EchoTime2 metadata field not found. Please consult the BIDS specification.'
            )
    return abs(float(te2) - float(te1))
