code: def do_GET(self):
      file_path = self.path.rstrip("/")
      file_data = self.files.get(file_path)
      if file_data is None:
          return self._respond(404)
      if "Range" in self.headers:
          ran = self.headers["Range"]
          b, ran = ran.split("=")
          start, end = ran.split("-")
          if start:
              file_data = file_data[
                  int(start) : (int(end) + 1) if end else None
              ]
          else:
              # suffix only
              file_data = file_data[-int(end) :]
      if "give_length" in self.headers:
          response_headers = {"Content-Length": len(file_data)}
          self._respond(200, response_headers, file_data)
      elif "give_range" in self.headers:
          self._respond(
              200,
              {
                  "Content-Range": "0-%i/%i"
                  % (len(file_data) - 1, len(file_data))
              },
              file_data,
          )
      else:
          self._respond(200, data=file_data)
  
file_path: ray/python/ray/data/tests/mock_http_server.py
imports: import contextlib
  import threading
  from http.server import BaseHTTPRequestHandler, HTTPServer
  import pytest
label_desc: Use image node_id 3 for calling the HTTPTestHandler obj's underlying member method code with example usage: obj.do_GET() and returns: self