code: def test_dataset_cannot_have_assets_with_none_mock() -> None:
      TOTAL_ASSETS = 10
      ASSETS_WITHOUT_MOCK = random.randint(2, 8)
      ASSETS_WITH_MOCK = TOTAL_ASSETS - ASSETS_WITHOUT_MOCK
  
      assets_without_mock = [
          Asset(**make_asset_without_mock())
          for _ in range(ASSETS_WITHOUT_MOCK)
      ]
      assets_with_mock = [
          Asset(**make_asset_with_mock())
          for _ in range(ASSETS_WITH_MOCK)
      ]
      assets = assets_without_mock + assets_with_mock
  
      with pytest.raises(ValidationError) as excinfo:
          Dataset(
              name=random_hash(),
              asset_list=assets,
          )
  
      assert _ASSET_WITH_NONE_MOCK_ERROR_MESSAGE in str(excinfo.value)
  
      assert Dataset(name=random_hash(), asset_list=assets_with_mock)
  
imports: import random
  from typing import Any
  from uuid import uuid4
  import numpy
  from pydantic import ValidationError
  import pytest
  import syft
  from syft.node.worker import Worker
  from syft.service.action.action_object import ActionObject
  from syft.service.dataset.dataset import CreateAsset
  from syft.service.dataset.dataset import CreateDataset
  from syft.service.dataset.dataset import _ASSET_WITH_NONE_MOCK_ERROR_MESSAGE
  from syft.service.response import SyftError
  from syft.service.response import SyftSuccess
  from syft.types.twin_object import TwinMode
label_desc: Use image node_id 12 for calling a global function with example usage: test_dataset_cannot_have_assets_with_none_mock() without return types