<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_nanopubstore_start_dt(url: str, start_dt: str):
 """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 """


    hostname = urllib.parse.urlsplit(url)[1]

    start_dates_doc = state_mgmt.get(start_dates_doc_key)
    if not start_dates_doc:
        start_dates_doc = {
            "_key": start_dates_doc_key,
            "start_dates": [{"nanopubstore": hostname, "start_dt": start_dt}],
        }
        state_mgmt.insert(start_dates_doc)
    else:
        for idx, start_date in enumerate(start_dates_doc["start_dates"]):
            if start_date["nanopubstore"] == hostname:
                start_dates_doc["start_dates"][idx]["start_dt"] = start_dt
                break
        else:
            start_dates_doc["start_dates"].append(
                {"nanopubstore": hostname, "start_dt": start_dt}
            )

        state_mgmt.replace(start_dates_doc)