class_docstr: Representation of an element in a Github tree (a file or folder).
  
  Attributes:
    parent_folder: the folder in which this element resides.
    name: the name of this element, e.g. the file name or the folder name.
    is_folder: whether this element is a folder or not.
class_docstr_tok: ["Representation","of","an","element","in","a","Github","tree","(","a","file","or","folder",")",".","Attributes",":","parent_folder",":","the","folder","in","which","this","element","resides",".","name",":","the","name","of","this","element",",","e.g",".","the","file","name","or","the","folder","name",".","is_folder",":","whether","this","element","is","a","folder","or","not","."]
code: def from_path(
      cls, path: pathlib.PurePosixPath, is_folder: bool
  ) -> "_GithubElement":
      parent_folder = _get_parent_folder(path)
      name = path.name
      return cls(
          parent_folder=parent_folder, name=name, is_folder=is_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 1 for calling the _GithubElement obj's underlying member method code with example usage: obj.from_path(cls, path, is_folder) and returns: cls