def load_edges_into_db(<EOL>nanopub_id: str,<EOL>nanopub_url: str,<EOL>edges: list = [],<EOL>edges_coll_name: str = edges_coll_name,<EOL>nodes_coll_name: str = nodes_coll_name,<EOL>):
start_time = datetime.datetime.now()<EOL>query = f"""<STR_LIT>"""<EOL>try:<EOL><INDENT>edgestore_db.aql.execute(query)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.debug(f"<STR_LIT>")<EOL><DEDENT>end_time1 = datetime.datetime.now()<EOL>delta_ms = f"<STR_LIT>"<EOL>log.info("<STR_LIT>", delta_ms=delta_ms)<EOL>query = f"""<STR_LIT>"""<EOL>try:<EOL><INDENT>edgestore_db.aql.execute(query)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.debug(f"<STR_LIT>")<EOL><DEDENT>end_time2 = datetime.datetime.now()<EOL>delta_ms = f"<STR_LIT>"<EOL>log.info("<STR_LIT>", delta_ms=delta_ms)<EOL>node_list, edge_list = [], []<EOL>for doc in edge_iterator(edges=edges):<EOL><INDENT>if doc[<NUM_LIT:0>] == "<STR_LIT>":<EOL><INDENT>node_list.append(doc[<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>edge_list.append(doc[<NUM_LIT:1>])<EOL><DEDENT><DEDENT>end_time3 = datetime.datetime.now()<EOL>delta_ms = f"<STR_LIT>"<EOL>log.info("<STR_LIT>", delta_ms=delta_ms)<EOL>try:<EOL><INDENT>results = edgestore_db.collection(edges_coll_name).import_bulk(<EOL>edge_list, on_duplicate="<STR_LIT:replace>", halt_on_error=False<EOL>)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL><DEDENT>end_time4 = datetime.datetime.now()<EOL>delta_ms = f"<STR_LIT>"<EOL>log.info("<STR_LIT>", delta_ms=delta_ms)<EOL>try:<EOL><INDENT>results = edgestore_db.collection(nodes_coll_name).import_bulk(<EOL>node_list, on_duplicate="<STR_LIT:replace>", halt_on_error=False<EOL>)<EOL><DEDENT>except Exception as e:<EOL><INDENT>log.error(f"<STR_LIT>")<EOL><DEDENT>end_time5 = datetime.datetime.now()<EOL>delta_ms = f"<STR_LIT>"<EOL>log.info("<STR_LIT>", delta_ms=delta_ms)<EOL>
Load edges into Edgestore