code: def test_to_numpy():
      """Test that transformation to numpy arrays is sensible."""
      solubility_dataset = load_solubility_data()
      data_shape = solubility_dataset.get_data_shape()
      tasks = solubility_dataset.get_task_names()
      X, y, w, ids = (
          solubility_dataset.X,
          solubility_dataset.y,
          solubility_dataset.w,
          solubility_dataset.ids,
      )
      N_samples = len(solubility_dataset)
      N_tasks = len(tasks)
  
      assert X.shape == (N_samples,) + data_shape
      assert y.shape == (N_samples, N_tasks)
      assert w.shape == (N_samples, N_tasks)
      assert ids.shape == (N_samples,)
  
imports: import random
  import math
  import unittest
  import os
  import numpy
  import pytest
  import deepchem
  import pandas
  import tempfile
label_desc: Use image node_id 16 for calling a global function with example usage: test_to_numpy() without return types