def find_mapreduce_yaml():
  """Traverse up from current directory and find mapreduce.yaml file.

  Returns:
    the path of mapreduce.yaml file or None if not found.
  """
  dir = os.path.dirname(__file__)
  while dir:
    for mr_yaml_name in MR_YAML_NAMES:
      yaml_path = os.path.join(dir, mr_yaml_name)
      if os.path.exists(yaml_path):
        return yaml_path
    parent = os.path.dirname(dir)
    if parent == dir:
      break
    dir = parent
  return None
Traverse up from current directory and find mapreduce.yaml file.

  Returns:
    the path of mapreduce.yaml file or None if not found.
  
mapreduce/status.py