'Parses the dispatch.yaml file.
Args:
basepath: the directory of the application.
appyaml: The app.yaml, if present.
Returns:
A DispatchInfoExternal object or None if the file does not exist.'

def _ParseDispatchYaml(self, basepath, appyaml=None):

    dispatch_yaml = self._ParseYamlFile(basepath, 'dispatch', dispatchinfo.LoadSingleDispatch)
    if (not dispatch_yaml):
        return None
    self._SetApplication(dispatch_yaml, 'dispatch', appyaml)
    return dispatch_yaml
