def __init__(self, network, participant=None):
<EOL>if network.failed:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(network)<EOL>)<EOL><DEDENT>if participant is not None and participant.failed:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(participant)<EOL>)<EOL><DEDENT>if participant is not None and participant.status != "<STR_LIT>":<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(participant)<EOL>)<EOL><DEDENT>self.network = network<EOL>self.network_id = network.id<EOL>network.calculate_full()<EOL>if participant is not None:<EOL><INDENT>self.participant = participant<EOL>self.participant_id = participant.id<EOL><DEDENT>
Create a node.