def calc_var_indices(input_vars, affected_vars):
    """Calculate indices of `affected_vars` in `input_vars`"""
    if affected_vars is None:
        return None

    return [ input_vars.index(var) for var in affected_vars ]