code: def bond_features(
      bond, use_chirality=False, use_extended_chirality=False
  ):
      """Helper method used to compute bond feature vectors.
  
      Many different featurization methods compute bond features
      such as WeaveFeaturizer. This method computes such features.
  
      Parameters
      ----------
      bond: rdkit.Chem.rdchem.Bond
          Bond to compute features on.
      use_chirality: bool, optional
          If true, use chirality information.
      use_extended_chirality: bool, optional
          If true, use chirality information with upto 6 different types.
  
      Note
      ----
      This method requires RDKit to be installed.
  
      Returns
      -------
      bond_feats: np.ndarray
          Array of bond features. This is a 1-D array of length 6 if `use_chirality`
          is `False` else of length 10 with chirality encoded.
  
      bond_feats: Sequence[Union[bool, int, float]]
          List of bond features returned if `use_extended_chirality` is `True`.
  
      Examples
      --------
      >>> from rdkit import Chem
      >>> mol = Chem.MolFromSmiles('CCC')
      >>> bond = mol.GetBonds()[0]
      >>> bond_features = dc.feat.graph_features.bond_features(bond)
      >>> type(bond_features)
      <class 'numpy.ndarray'>
      >>> bond_features.shape
      (6,)
  
      Note
      ----
      This method requires RDKit to be installed.
  
      """
      try:
          from rdkit import Chem
      except ModuleNotFoundError:
          raise ImportError(
              "This method requires RDKit to be installed."
          )
      bt = bond.GetBondType()
      bond_feats = [
          bt == Chem.rdchem.BondType.SINGLE,
          bt == Chem.rdchem.BondType.DOUBLE,
          bt == Chem.rdchem.BondType.TRIPLE,
          bt == Chem.rdchem.BondType.AROMATIC,
          bond.GetIsConjugated(),
          bond.IsInRing(),
      ]
      if use_chirality:
          bond_feats = bond_feats + one_of_k_encoding_unk(
              str(bond.GetStereo()),
              GraphConvConstants.possible_bond_stereo,
          )
  
      if use_extended_chirality:
          stereo = one_hot_encode(
              int(bond.GetStereo()), list(range(6)), True
          )
          stereo = [int(feature) for feature in stereo]
          bond_feats = bond_feats + stereo
          return bond_feats
  
      return np.array(bond_feats)
  
imports: import numpy
  import deepchem
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.feat.mol_graphs import ConvMol, WeaveMol
  from deepchem.data import DiskDataset
  import logging
  from typing import Optional, List, Tuple, Union, Iterable
  from deepchem.utils.typing import RDKitMol, RDKitAtom
  from deepchem.utils.molecule_feature_utils import one_hot_encode
label_desc: Use image node_id 10 for calling a global function with example usage: bond_features(bond, use_chirality, use_extended_chirality) and returns: np, bond_feats