parameters: (class_name: str, enum_decl: ast_pb2.EnumDecl)
docstring: Generates enums.
docstring_summary: Generates enums.
docstring_tokens: Generates enums .
function: def generate_from(class_name: str, enum_decl: ast_pb2.EnumDecl):
    """Generates enums."""
    yield I + (f'py::enum_<{enum_decl.name.cpp_name}>({class_name}, '
               f'"{enum_decl.name.native}")')
    for i, member in enumerate(enum_decl.members):
      s = I + I + f'.value("{member.native}", {member.cpp_name})'
      if i == len(enum_decl.members) - 1:
        s += ';'
      yield s
function_tokens: def generate_from ( class_name : str , enum_decl : ast_pb2 . EnumDecl ) : yield I + ( f'py::enum_<{enum_decl.name.cpp_name}>({class_name}, ' f'"{enum_decl.name.native}")' ) for i , member in enumerate ( enum_decl . members ) : s = I + I + f'.value("{member.native}", {member.cpp_name})' if i == len ( enum_decl . members ) - 1 : s += ';' yield s