code: def notebook_substitute_ref_with_url(ntbk, cr):
      
  
      # Iterate over cells in notebook
      for n in range(len(ntbk['cells'])):
          # Only process cells of type 'markdown'
          if ntbk['cells'][n]['cell_type'] == 'markdown':
              # Get text of markdown cell
              txt = ntbk['cells'][n]['source']
              # Replace links to online docs with sphinx cross-references
              txt = cr.substitute_ref_with_url(txt)
              # Replace current cell text with processed text
              ntbk['cells'][n]['source'] = txt
docs: In markdown cells of notebook object `ntbk`, replace sphinx
      cross-references with links to online docs. Parameter `cr` is a
      CrossReferenceLookup object.