def prepare_node(data):
    if not data:
        return None, {}
    if isinstance(data, str):
        return data, {}
    if all(field in data for field in ("Node", "Service", "Checks")):
        return data["Node"]["Node"], data["Node"]
    result = {}
    if "ID" in data:
        result["Node"] = data["ID"]
    for k in ("Datacenter", "Node", "Address",
              "TaggedAddresses", "Service",
              "Check", "Checks"):
        if k in data:
            result[k] = data[k]
    if list(result) == ["Node"]:
        return result["Node"], {}
    return result.get("Node"), result