class_docstr: A Github tree of a repository.
class_docstr_tok: ["A","Github","tree","of","a","repository","."]
docstr: Factory which caches the entire Github tree.
docstr_tok: ["Factory","which","caches","the","entire","Github","tree","."]
code: def from_cache(repo: str, branch: str) -> "_GithubTree":
      """Factory which caches the entire Github tree."""
      tree_json = GithubApi().query_tree(repo, branch)
      # If the tree is truncated, then we'll need a more sophisticated method to
      # retrieve the whole tree. Since this is currently not supported, it raises
      # an exception.
      assert not tree_json.get(
          "truncated", False
      )  # pytype: disable=attribute-error  # dynamic-method-lookup
      return _GithubTree.from_json(tree_json)
  
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 4 for calling the _GithubTree obj's underlying member method code with example usage: obj.from_cache(repo, branch) and returns: _GithubTree