<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notebook_to_rst(npth, rpth, rdir, cr=None):
 """ Convert notebook at `npth` to rst document at `rpth`, in directory `rdir`. Parameter `cr` is a CrossReferenceLookup object. """


    # Read the notebook file
    ntbk = nbformat.read(npth, nbformat.NO_CONVERT)
    # Convert notebook object to rstpth
    notebook_object_to_rst(ntbk, rpth, rdir, cr)