code: def write(self, name, data):
      f = self.tar.tarinfo()
      f.name = name
      f.size = len(data)
      self.tar.addfile(f, io.BytesIO(data))
  
file_path: ray/python/ray/data/tests/test_webdataset.py
imports: import glob
  import io
  import os
  import tarfile
  import pytest
  import ray
  from ray.tests.conftest import *
label_desc: Use image node_id 4 for calling the TarWriter obj's underlying member method code with example usage: obj.write(name, data) without return types