code: def position(self, message):
          
          if not message.line_number:
              message.line_number = 1
          for patched_file in self.patch:
              target = patched_file.target_file.lstrip("b/")
              if target == message.path:
                  offset = 1
                  for hunk in patched_file:
                      for position, hunk_line in enumerate(hunk):
                          if hunk_line.target_line_no == message.line_number:
                              if not hunk_line.is_added:
                                  # if the line isn't an added line, we don't want to comment on it
                                  return
  
                              return position + offset
  
                      offset += len(hunk) + 1
docs: Calculate position within the PR, which is not the line number