code: def proto_files(root):
    
    for (dirpath, _, filenames) in os.walk(root):
      for filename in filenames:
        if filename.endswith('.proto'):
          yield os.path.join(dirpath, filename)
docs: Yields the path of all .proto files under the root.