def get_proteinnet_data(d, id):
    """
    Search for and return the data for the protein with ID in dataset d.
    """
    for subset_name, subset in zip(["train", "valid", "test"], (d["train"], d["valid"][70], d["test"])):
        for idx, pn_id in enumerate(subset["ids"]):
            if id.upper() in pn_id:
                return subset["ang"][idx], subset["ids"][idx], subset["crd"][idx], subset["seq"][idx]
    print(f"Could not find {id}.")
    return None, None, None, None