docs: def seek(self, offset, from_what=os.SEEK_SET):
          '''
          :param offset: Position in the file to seek to
          :type offset: integer
  
          Seeks to *offset* bytes from the beginning of the file.  This is a no-op if the file is open for writing.
  
          The position is computed from adding *offset* to a reference point; the reference point is selected by the
          *from_what* argument. A *from_what* value of 0 measures from the beginning of the file, 1 uses the current file
          position, and 2 uses the end of the file as the reference point. *from_what* can be omitted and defaults to 0,
          using the beginning of the file as the reference point.
          '''
          if from_what == os.SEEK_SET:
              reference_pos = 0
          elif from_what == os.SEEK_CUR:
              reference_pos = self._pos
          elif from_what == os.SEEK_END:
              if self._file_length == None:
                  desc = self.describe()
                  self._file_length = int(desc["size"])
              reference_pos = self._file_length
          else:
              raise DXFileError("Invalid value supplied for from_what")
  
          orig_pos = self._pos
          self._pos = reference_pos + offset
  
          in_buf = False
          orig_buf_pos = self._read_buf.tell()
          if offset < orig_pos:
              if orig_buf_pos > orig_pos - offset:
                  # offset is less than original position but within the buffer
                  in_buf = True
          else:
              buf_len = dxpy.utils.string_buffer_length(self._read_buf)
              if buf_len - orig_buf_pos > offset - orig_pos:
                  # offset is greater than original position but within the buffer
                  in_buf = True
  
          if in_buf:
              # offset is within the buffer (at least one byte following
              # the offset can be read directly out of the buffer)
              self._read_buf.seek(orig_buf_pos - orig_pos + offset)
          elif offset == orig_pos:
              # This seek is a no-op (the cursor is just past the end of
              # the read buffer and coincides with the desired seek
              # position). We don't have the data ready, but the request
              # for the data starting here is already in flight.
              #
              # Detecting this case helps to optimize for sequential read
              # access patterns.
              pass
          else:
              # offset is outside the buffer-- reset buffer and queues.
              # This is the failsafe behavior
              self._read_buf = BytesIO()
              # TODO: if the offset is within the next response(s), don't throw out the queues
              self._request_iterator, self._response_iterator = None, None