def _init_from_path(self, path: Text) -> None:
    if os.path.isfile(path):
        self._init_from_file(path)
    elif os.path.isdir(path):
        self._init_from_directory(path)
def _init_from_path(self, path: Text) -> None:
    if os.path.isfile(path):
        self._init_from_file(path)
    elif os.path.isdir(path):
        self._init_from_directory(path)