def _initial_GRASP_candidates(target,primes,forbidden):
    """Helper function for GRASP driver search. Constructs initial candidates
    for driver nodes.

    Parameters
    ----------
    target : partial state dictionary
        pyboolnet implicant that defines target fixed node states.
    primes : pyboolnet primes dictionary
        Update rules.
    forbidden : set of str variable names
        Variables to be considered uncontrollable (the default is None).

    Returns
    -------
    candidates : list of partial state dictionaries
        List of variable states that can potentially lead to the target.

    """
    if forbidden is None:
        candidate_vars = list(primes.keys())
    else:
        candidate_vars = [k for k in primes if not k in forbidden]
    candidates = []
    for st in [0,1]:
        candidates += [{k:st} for k in candidate_vars]
    return candidates