<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def position(self, message):
 """Calculate position within the PR, which is not the line number"""

        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