class_docstr: Test that support generation happens properly.
class_docstr_tok: ["Test","that","support","generation","happens","properly","."]
docstr: Tests that get_task_support samples correctly.
docstr_tok: ["Tests","that","get_task_support","samples","correctly","."]
code: def test_get_task_support_simple(self):
      """Tests that get_task_support samples correctly."""
      n_samples = 20
      n_features = 3
      n_tasks = 1
  
      # Generate dummy dataset
      np.random.seed(123)
      ids = np.arange(n_samples)
      X = np.random.rand(n_samples, n_features)
      y = np.random.randint(2, size=(n_samples, n_tasks))
      w = np.ones((n_samples, n_tasks))
      dataset = dc.data.NumpyDataset(X, y, w, ids)
  
      n_episodes = 20
      n_pos = 1
      n_neg = 5
      supports = dc.data.get_task_support(
          dataset, n_episodes, n_pos, n_neg, task=0, log_every_n=10
      )
      assert len(supports) == n_episodes
  
      for support in supports:
          assert len(support) == n_pos + n_neg
          assert np.count_nonzero(support.y) == n_pos
  
file_path: deepchem/deepchem/data/tests/test_support_generator.py
imports: import logging
  import numpy
  import unittest
  import deepchem
label_desc: Use image node_id 2 for calling the TestSupports obj's underlying member method code with example usage: obj.test_get_task_support_simple() without return types