code: def _image_encoder(ffcv_parameters: "FFCVParameters"):
      """
      Create a :class:`RGBImageField` given additional
      parameters passed by the user. Follows the FFCV defaults.
  
      :param ffcv_parameters: The additional parameters passed
          to the :func:`enable_ffcv` function.
      :return: A :class:`RGBImageField` instance.
      """
      from ffcv.fields import RGBImageField
  
      return RGBImageField(
          write_mode=ffcv_parameters.get("write_mode", "raw"),
          max_resolution=ffcv_parameters.get("max_resolution", None),
          smart_threshold=ffcv_parameters.get("smart_threshold", None),
          jpeg_quality=ffcv_parameters.get("jpeg_quality", 90),
          compress_probability=ffcv_parameters.get(
              "compress_probability", 0.5
          ),
      )
  
file_path: avalanche/avalanche/benchmarks/utils/ffcv_support/ffcv_support_internals.py
imports: from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Union
  from collections import OrderedDict
  import numpy
  from torch import Tensor
  from PIL.Image import Image
  from ffcv.fields import TorchTensorField
  from ffcv.fields.decoders import IntDecoder, FloatDecoder, NDArrayDecoder, SimpleRGBImageDecoder
label_desc: Use image node_id 1 for calling a global function with example usage: _image_encoder(ffcv_parameters) and returns: RGBImageField