code: def numBridgeheadsAndSpiro(mol, ri=None):
      nSpiro = rdMolDescriptors.CalcNumSpiroAtoms(mol)
      nBridgehead = rdMolDescriptors.CalcNumBridgeheadAtoms(mol)
      return nBridgehead, nSpiro
  
file_path: DIG/dig/ggraph/method/JTVAE/fast_jtnn/sascorer.py
imports: from __future__ import print_function
  from rdkit import Chem
  from rdkit.Chem import rdMolDescriptors
  from rdkit.six.moves import cPickle
  from rdkit.six import iteritems
  import math
  from collections import defaultdict
  import os.path
label_desc: Use image node_id 2 for calling a global function with example usage: numBridgeheadsAndSpiro(mol, ri) and returns: nBridgehead,  nSpiro