code: def test_handle_classification_mode_direct():
      """Test proper thresholding."""
      y = np.random.rand(10, 2)
      y = y / np.sum(y, axis=1)[:, np.newaxis]
      y = np.expand_dims(y, 1)
      y_expected = y
      y_out = handle_classification_mode(y, "direct")
      assert y_out.shape == (10, 1, 2)
      assert np.array_equal(y_out, y_expected)
  
imports: import numpy
  import deepchem
  from deepchem.metrics import to_one_hot
  from deepchem.metrics import from_one_hot
  from deepchem.metrics import threshold_predictions
  from deepchem.metrics import handle_classification_mode
  from deepchem.metrics import normalize_prediction_shape
  from deepchem.metrics import normalize_weight_shape
label_desc: Use image node_id 2 for calling a global function with example usage: test_handle_classification_mode_direct() without return types