code: def test_process_payload(
      payload: MoonWebhookV2Payload,
      does_update: bool,
  ) -> None:
      with patch(
          "api.routes.webhook.delete_dataset"
      ) as mock_delete_dataset:
          with patch(
              "api.routes.webhook.update_dataset"
          ) as mock_update_dataset:
              process_payload(
                  payload,
                  blocked_datasets=[],
                  hf_endpoint="https://huggingface.co",
              )
              assert mock_delete_dataset.call_count == int(does_update)
              assert mock_update_dataset.call_count == int(does_update)
  
imports: from collections.abc import Mapping
  from typing import Any
  from unittest.mock import patch
  import pytest
  from api.routes.webhook import MoonWebhookV2Payload, parse_payload, process_payload
label_desc: Use image node_id 2 for calling a global function with example usage: test_process_payload(payload, does_update) without return types