code: def get_mapreduce_yaml(parse=parse_mapreduce_yaml):
    
    mr_yaml_path = find_mapreduce_yaml()
    if not mr_yaml_path:
      raise errors.MissingYamlError()
    mr_yaml_file = open(mr_yaml_path)
    try:
      return parse(mr_yaml_file.read())
    finally:
      mr_yaml_file.close()
docs: Locates mapreduce.yaml, loads and parses its info.
  
    Args:
      parse: Used for testing.
  
    Returns:
      MapReduceYaml object.
  
    Raises:
      errors.BadYamlError: when contents is not a valid mapreduce.yaml file or the
      file is missing.