code: def __enter__(self):
      self.handle = NamedTemporaryFile()
      handle = self.handle.__enter__()
      name = handle.name
      dataset = DummyDataset(self.num_samples, self.size_bytes)
      writer = DatasetWriter(
          self.num_samples,
          name,
          {"index": IntField(), "value": BytesField()},
      )
  
      with writer:
          writer.write_pytorch_dataset(
              dataset, num_workers=-1, chunksize=100
          )
  
      reader = Reader(name)
      manager = OSCacheManager(reader)
      context = manager.schedule_epoch(np.arange(self.num_samples))
      context.__enter__()
      self.context = context
  
      Compiler.set_enabled(self.compiled)
      memcpy_c = Compiler.compile(memcpy)
  
      read_fn = manager.compile_reader()
  
      if self.random_reads:
          indices = np.random.choice(
              self.num_samples, self.n, replace=False
          )
      else:
          indices = np.arange(self.num_samples)[: self.n]
  
      addresses = reader.alloc_table["ptr"][indices]
  
      self.buffer = np.zeros(self.size_bytes, dtype="<u1")
  
      def code(buff, state):
          for i in range(addresses.shape[0]):
              memcpy_c(read_fn(addresses[i], state), buff)
  
      self.code = Compiler.compile(code)
  
imports: import os
  from tempfile import NamedTemporaryFile
  from time import sleep, time
  import numpy
  from tqdm import tqdm
  from assertpy import assert_that
  from torch.utils.data import Dataset
  from ffcv.writer import DatasetWriter
  from ffcv.reader import Reader
  from ffcv.fields import BytesField, IntField
  from ffcv.pipeline.compiler import Compiler
  from ffcv.memory_managers import OSCacheManager
  from ffcv.libffcv import memcpy
  from ..decorator import benchmark
  from ..benchmark import Benchmark
label_desc: Use image node_id 2 for calling the MemoryReadBytesBench obj's underlying member method code with example usage: obj.__enter__() without return types