code: def patch(nml_path, nml_patch, out_path=None):
      
      parser = Parser()
  
      return parser.read(nml_path, nml_patch, out_path)
docs: Create a new namelist based on an input namelist and reference dict.
  
      >>> f90nml.patch('data.nml', nml_patch, 'patched_data.nml')
  
      This function is equivalent to the ``read`` function of the ``Parser``
      object with the patch output arguments.
  
      >>> parser = f90nml.Parser()
      >>> nml = parser.read('data.nml', nml_patch, 'patched_data.nml')
  
      A patched namelist file will retain any formatting or comments from the
      original namelist file.  Any modified values will be formatted based on the
      settings of the ``Namelist`` object.