def _digi_nan(fmt):
    """
    Return the wfdb digital value used to store nan for the format type.

    Parmeters
    ---------
    fmt : str, or list
        The wfdb dat format, or a list of them.

    """
    if isinstance(fmt, list):
        return [_digi_nan(f) for f in fmt]

    if fmt == '80':
        return -128
    if fmt == '310':
        return -512
    if fmt == '311':
        return -512
    elif fmt == '212':
        return -2048
    elif fmt == '16':
        return -32768
    elif fmt == '61':
        return -32768
    elif fmt == '160':
        return -32768
    elif fmt == '24':
        return -8388608
    elif fmt == '32':
        return -2147483648
def _digi_nan ( fmt ) : if isinstance ( fmt , list ) : return [ _digi_nan ( f ) for f in fmt ] if fmt == '80' : return - 128 if fmt == '310' : return - 512 if fmt == '311' : return - 512 elif fmt == '212' : return - 2048 elif fmt == '16' : return - 32768 elif fmt == '61' : return - 32768 elif fmt == '160' : return - 32768 elif fmt == '24' : return - 8388608 elif fmt == '32' : return - 2147483648
Return the wfdb digital value used to store nan for the format type.

    Parmeters
    ---------
    fmt : str, or list
        The wfdb dat format, or a list of them.