def _fix_vars(obj, variable):
    """
    Recursively searches the nested sim dict structure, and attempts to find
    every instance of '&&', replace it with some variable, and evaulate that
    string. It does this by recursively building a copy of the object if it
    contains dict or list substructures. Note that this function will not
    search in any structures other than lists or dicts.
    """
    if isinstance(obj, dict):
        return {key: _fix_vars(val, variable) for key, val in obj.items()}
    elif isinstance(obj, list):
        return [_fix_vars(key, variable) for key in obj]
    elif isinstance(obj, str):
        if '&&' in obj:
            return eval(obj.replace("&&", str(variable)))
        else:
            return obj
    return obj