def update_nanopubstore_start_dt(url: str, start_dt: str):
hostname = urllib.parse.urlsplit(url)[<NUM_LIT:1>]<EOL>start_dates_doc = state_mgmt.get(start_dates_doc_key)<EOL>if not start_dates_doc:<EOL><INDENT>start_dates_doc = {<EOL>"<STR_LIT>": start_dates_doc_key,<EOL>"<STR_LIT>": [{"<STR_LIT>": hostname, "<STR_LIT>": start_dt}],<EOL>}<EOL>state_mgmt.insert(start_dates_doc)<EOL><DEDENT>else:<EOL><INDENT>for idx, start_date in enumerate(start_dates_doc["<STR_LIT>"]):<EOL><INDENT>if start_date["<STR_LIT>"] == hostname:<EOL><INDENT>start_dates_doc["<STR_LIT>"][idx]["<STR_LIT>"] = start_dt<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>start_dates_doc["<STR_LIT>"].append(<EOL>{"<STR_LIT>": hostname, "<STR_LIT>": start_dt}<EOL>)<EOL><DEDENT>state_mgmt.replace(start_dates_doc)<EOL><DEDENT>
Add nanopubstore start_dt to belapi.state_mgmt collection

    Args:
        url: url of nanopubstore
        start_dt: datetime of last query against nanopubstore for new ID's