code: def test_compute_features_on_infinity_distance():
      """Test that WeaveModel correctly transforms WeaveMol objects into tensors with infinite max_pair_distance."""
      featurizer = WeaveFeaturizer(max_pair_distance=None)
      X = featurizer(["C", "CCC"])
      batch_size = 20
      model = WeaveModel(
          1,
          batch_size=batch_size,
          mode="classification",
          fully_connected_layer_sizes=[2000, 1000],
          batch_normalize=True,
          batch_normalize_kwargs={
              "fused": False,
              "trainable": True,
              "renorm": True,
          },
          learning_rate=0.0005,
      )
      (
          atom_feat,
          pair_feat,
          pair_split,
          atom_split,
          atom_to_pair,
      ) = model.compute_features_on_batch(X)
  
      # There are 4 atoms each of which have 75 atom features
      assert atom_feat.shape == (4, 75)
      # There are 10 pairs with infinity distance and 14 pair features
      assert pair_feat.shape == (10, 14)
      # 4 atoms in total
      assert atom_split.shape == (4,)
      assert np.all(atom_split == np.array([0, 1, 1, 1]))
      # 10 pairs in total
      assert pair_split.shape == (10,)
      assert np.all(
          pair_split == np.array([0, 1, 1, 1, 2, 2, 2, 3, 3, 3])
      )
      # 10 pairs in total each with start/finish
      assert atom_to_pair.shape == (10, 2)
      assert np.all(
          atom_to_pair
          == np.array(
              [
                  [0, 0],
                  [1, 1],
                  [1, 2],
                  [1, 3],
                  [2, 1],
                  [2, 2],
                  [2, 3],
                  [3, 1],
                  [3, 2],
                  [3, 3],
              ]
          )
      )
  
file_path: deepchem/deepchem/models/tests/test_weave_models.py
imports: import numpy
  import pytest
  from flaky import flaky
  from deepchem.data import NumpyDataset
  from deepchem.metrics import Metric, roc_auc_score, mean_absolute_error
  from deepchem.molnet import load_bace_classification, load_delaney
  from deepchem.feat import WeaveFeaturizer
label_desc: Use image node_id 2 for calling a global function with example usage: test_compute_features_on_infinity_distance() without return types