Returns the nuclearity type of an RST relation (i.e. 'multinuc',
    'nucsat' or 'multisat') or 'edu' if the node is below the relation
    level.

def get_nuclearity_type(child_types):
    """Returns the nuclearity type of an RST relation (i.e. 'multinuc',
    'nucsat' or 'multisat') or 'edu' if the node is below the relation
    level.
    """
    if 'text' in child_types and len(child_types) == 1:
        return NucType.edu

    assert 'nucleus' in child_types, \
        "This is not a relational node. child_types: {}".format(child_types)

    if 'satellite' not in child_types:
        assert len(child_types['nucleus']) > 1
        return NucType.multinuc

    else:  # 'satellite' in child_types
        assert len(child_types['nucleus']) == 1
        if len(child_types['satellite']) == 1:
            return NucType.nucsat
        else:
            assert len(child_types['satellite']) > 1
            return NucType.multisat