def get_outer_window(bands_node, silent=False):
    """
    Get the ``outer_window`` parameter as a tuple (min, max), if it was given.

    Check if bands_node

    * is a child of a calculation and
    * that calculation has a parameter data input node with linkname parameters and
    * that node has the keys 'dis_win_min' and 'dis_win_max'.

    If that is the case, output outer_window = (min, max).
    """
    owindow = None
    try:
        calc = bands_node.inp.bands
        wset = calc.inp.parameters.get_dict()
        owindow = (wset['dis_win_min'], wset['dis_win_max'])
    except KeyError as err:
        if not silent:
            raise KeyError('Missing window parameters in input to ' 'parent calculation:\n' + str(err)) from err
    except AttributeError as err:
        if not silent:
            raise AttributeError('bands_node is not an output of an appropriate calc node.' + str(err)) from err
    return owindow