code: def load_from_folder(path: RichPath, shuffle: bool):
      all_files = path.get_filtered_files_in_dir("*.jsonl.gz")
      if shuffle:
          random.shuffle(all_files)
      for file in all_files:
          yield from file.read_as_jsonl()
  
file_path: ptgnn/ptgnn/implementations/typilus/train.py
imports: import logging
  import random
  import torch
  from docopt import docopt
  from dpu_utils.utils import RichPath, run_and_debug
  from pathlib import Path
  from ptgnn.baseneuralmodel import ModelTrainer
  from ptgnn.baseneuralmodel.utils.amlutils import configure_logging, log_run
  from ptgnn.baseneuralmodel.utils.data import LazyDataIterable
  from ptgnn.implementations.typilus.graph2class import Graph2Class
  from ptgnn.neuralmodels.embeddings.strelementrepresentationmodel import StrElementRepresentationModel
  from ptgnn.neuralmodels.gnn import GraphNeuralNetworkModel
  from ptgnn.neuralmodels.gnn.messagepassing import GatedMessagePassingLayer, MlpMessagePassingLayer
  from ptgnn.neuralmodels.gnn.messagepassing.residuallayers import ConcatResidualLayer
label_desc: Use image node_id 2 for calling a global function with example usage: load_from_folder(path, shuffle) without return types