code: def notebook_to_rst(npth, rpth, rdir, cr=None):
      
  
      # Read the notebook file
      ntbk = nbformat.read(npth, nbformat.NO_CONVERT)
      # Convert notebook object to rstpth
      notebook_object_to_rst(ntbk, rpth, rdir, cr)
docs: Convert notebook at `npth` to rst document at `rpth`, in directory
      `rdir`. Parameter `cr` is a CrossReferenceLookup object.