code: def __getitem__(self, idx):
      with numpy_seed(self.seed + idx):
          class_id = int(np.random.random() < self.class_ratio)
          image = np.zeros((self.crop_size, self.crop_size, 3))
          image[:, :, class_id] = np.random.random(
              [self.crop_size, self.crop_size]
          )
          image[:, :, 2] = np.random.random(
              [self.crop_size, self.crop_size]
          )
          input = Image.fromarray((image * 255).astype(np.uint8))
          target = class_id
          return _get_typed_sample(input, target, idx, self.sample_type)
  
file_path: ClassyVision/classy_vision/dataset/core/random_image_datasets.py
imports: from enum import Enum
  import numpy
  from PIL import Image
  from ...generic.util import numpy_seed
label_desc: Use image node_id 2 for calling the RandomImageBinaryClassDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: _get_typed_sample