def getPureSuccesors(trans, state):
    """Function returns the succesors of the state on the basis of
    the transition dictionary (could be backward transition dictionary,
    than the ancestor is returned). The state it self is not counted.

    Args:
        trans (dict): Transition dictionary.
        state (string): State whose succesors is returned.

    Returns:
        set: The set of a pure succesors of the state. If the state has
             no succesor/ancestor, then the set containing None is returned.
    """

    succesors = set()
    if state in trans:
        for letter in trans[state]:
            # Self loops does not count.
            succesors.update(trans[state][letter].difference({state}))
    
    # If the set of succesors is emtpy, the set containging None will be reutrned.
    if not succesors:
        succesors.add(None)
    
    return succesors