class_docstr: Synthetic image dataset that behaves like a streaming dataset.
  
  Requires a "num_samples" argument which decides the number of samples in the
  phase. Also takes an optional "length" input which sets the length of the
  dataset.
code: def from_config(cls, config):
      # Parse the config
      assert all(
          key in config for key in ["crop_size", "class_ratio", "seed"]
      )
      length = config.get("length")
      crop_size = config["crop_size"]
      class_ratio = config["class_ratio"]
      seed = config["seed"]
      (
          transform_config,
          batchsize_per_replica,
          shuffle,
          num_samples,
      ) = cls.parse_config(config)
      async_gpu_copy = config.get("async_gpu_copy", False)
  
      # Build the transforms
      default_transform = transforms.Compose(
          [
              transforms.ToTensor(),
              transforms.Normalize(
                  mean=ImagenetConstants.MEAN, std=ImagenetConstants.STD
              ),
          ]
      )
      transform = build_field_transform_default_imagenet(
          transform_config, default_transform=default_transform
      )
  
      return cls(
          batchsize_per_replica,
          shuffle,
          transform,
          num_samples,
          crop_size,
          class_ratio,
          seed,
          length=length,
          async_gpu_copy=async_gpu_copy,
      )
  
file_path: ClassyVision/classy_vision/dataset/classy_synthetic_image_streaming.py
imports: import torchvision.transforms
  from classy_vision.dataset import register_dataset
  from classy_vision.dataset.classy_dataset import ClassyDataset
  from classy_vision.dataset.core import RandomImageBinaryClassDataset
  from classy_vision.dataset.dataloader_async_gpu_wrapper import DataloaderAsyncGPUWrapper
  from classy_vision.dataset.dataloader_limit_wrapper import DataloaderLimitWrapper
  from classy_vision.dataset.transforms.util import build_field_transform_default_imagenet, ImagenetConstants
label_desc: Use image node_id 2 for calling the SyntheticImageStreamingDataset obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls