@app.route("<STR_LIT>", methods=["<STR_LIT:POST>"])<EOL>@db.serialized<EOL>def create_node(participant_id):
exp = Experiment(session)<EOL>try:<EOL><INDENT>participant = models.Participant.query.filter_by(id=participant_id).one()<EOL><DEDENT>except NoResultFound:<EOL><INDENT>return error_response(error_type="<STR_LIT>", status=<NUM_LIT>)<EOL><DEDENT>if participant.status != "<STR_LIT>":<EOL><INDENT>error_type = "<STR_LIT>".format(participant.status)<EOL>return error_response(error_type=error_type, participant=participant)<EOL><DEDENT>network = exp.get_network_for_participant(participant=participant)<EOL>if network is None:<EOL><INDENT>return Response(dumps({"<STR_LIT:status>": "<STR_LIT:error>"}), status=<NUM_LIT>)<EOL><DEDENT>node = exp.create_node(participant=participant, network=network)<EOL>assign_properties(node)<EOL>exp.add_node_to_network(node=node, network=network)<EOL>exp.node_post_request(participant=participant, node=node)<EOL>return success_response(node=node.__json__())<EOL>
Send a POST request to the node table.

    This makes a new node for the participant, it calls:
        1. exp.get_network_for_participant
        2. exp.create_node
        3. exp.add_node_to_network
        4. exp.node_post_request