def test_within_subgoals():
    """Test that it correctly identifies a state between or not between two subgoals."""
    a = SubgoalNode([0.5, 0.25])
    b = SubgoalNode([0.25, 0.25])
    c = SubgoalNode([0.5, 0.75])
    a.connections += [b, c]
    print(a.connections)

    assert not ChemistryLab.is_within_subgoals([0.5, 0.5], a, b)
    assert ChemistryLab.is_within_subgoals([0.3, 0.25], a, b)
    assert ChemistryLab.is_within_subgoals([0.2, 0.25], a, b)
    assert not ChemistryLab.is_within_subgoals([0.145, 0.25], a, b)
    assert ChemistryLab.is_within_subgoals([0.6, 0.6], a, c)