class_docstr: A Github tree of a repository.
class_docstr_tok: ["A","Github","tree","of","a","repository","."]
docstr: Parses a GithubTree from the given JSON.
docstr_tok: ["Parses","a","GithubTree","from","the","given","JSON","."]
code: def from_json(cls, value) -> "_GithubTree":
      """Parses a GithubTree from the given JSON."""
      if not isinstance(value, dict) or "tree" not in value:
          raise ValueError(
              f"Github API response not supported: {value}"
          )
  
      files_per_folder: MutableMapping[str, Set[str]] = {}
      for element in value["tree"]:
          github_element = _GithubElement.from_path(
              path=pathlib.PurePosixPath(element["path"]),
              is_folder=(element["type"] == "tree"),
          )
          if element["type"] in {"blob", "tree"}:
              files_per_folder.setdefault(
                  github_element.parent_folder, set()
              )
              files_per_folder[github_element.parent_folder].add(
                  github_element
              )
      return _GithubTree(files_per_folder=files_per_folder)
  
imports: import dataclasses
  import functools
  import os
  import pathlib
  import posixpath
  from typing import Iterator, Mapping, MutableMapping, Optional, Set, Tuple
  from etils import epath
  import requests
  from tensorflow_datasets.core import utils
label_desc: Use image node_id 3 for calling the _GithubTree obj's underlying member method code with example usage: obj.from_json(cls, value) and returns: _GithubTree