def METHOD_NAME(base_url, enrollment_secret, computer_name, serial_number, uuid, osquery_version):
    enroll_payload = {
        "host_identifier": computer_name,
        "enroll_secret": enrollment_secret,
        "platform_type": "21",
        "host_details": {"system_info": {"hardware_serial": serial_number,
                                         "uuid": uuid},
                         "osquery_info": {"version": osquery_version}},
    }
    response = requests.post(f"{base_url}/osquery/enroll",
                             json=enroll_payload,
                             headers={'user-agent': f"osquery/{osquery_version}"})
    response.raise_for_status()
    return response.json()["node_key"]