code: def _get_what_to_read_next(fp, previously_read_position, chunk_size):
      
      seek_position = max(previously_read_position - chunk_size, 0)
      read_size = chunk_size
  
      # examples: say, our new_lines are potentially "\r\n", "\n", "\r"
      # find a reading point where it is not "\n", rewind further if necessary
      # if we have "\r\n" and we read in "\n",
      # the next iteration would treat "\r" as a different new line.
      # Q: why don't I just check if it is b"\n", but use a function ?
      # A: so that we can potentially expand this into generic sets of separators, later on.
      while seek_position > 0:
          fp.seek(seek_position)
          if _is_partially_read_new_line(fp.read(1)):
              seek_position -= 1
              read_size += 1  # as we rewind further, let's make sure we read more to compensate
          else:
              break
  
      # take care of special case when we are back to the beginnin of the file
      read_size = min(previously_read_position - seek_position, read_size)
      return seek_position, read_size
docs: Return information on which file pointer position to read from and how many bytes.
  
      Args:
          fp
          past_read_positon (int): The file pointer position that has been read previously
          chunk_size(int): ideal io chunk_size
  
      Returns:
          (int, int): The next seek position, how many bytes to read next