class_docstr: DatasetBuilder for controlled_noisy_web_labels dataset.
class_docstr_tok: ["DatasetBuilder","for","controlled_noisy_web_labels","dataset","."]
code: def _resize_image(self, buf, resolution=84):
      cv2 = tfds.core.lazy_imports.cv2
  
      image = cv2.imdecode(np.frombuffer(buf, dtype=np.uint8), flags=3)
      im_resized = cv2.resize(
          image, (resolution, resolution), interpolation=cv2.INTER_AREA
      )
      _, buff = cv2.imencode(
          ".jpg", im_resized, [int(cv2.IMWRITE_JPEG_QUALITY), 72]
      )
      return buff.tobytes()
  
file_path: datasets/tensorflow_datasets/image_classification/controlled_noisy_web_labels/controlled_noisy_web_labels.py
imports: import csv
  import dataclasses
  import io
  import json
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the ControlledNoisyWebLabels obj's underlying member method code with example usage: obj._resize_image(buf, resolution) and returns: buff