Remove Nth Node From End of List in Python

class Solution:
    def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]:
        dummy = ListNode(0, head)  # A dummy node to handle edge cases
        fast = slow = dummy  # Initialize both pointers to the dummy node

        # Advance 'fast' by 'n' nodes
        for _ in range(n):
            fast =

        # Traverse the list until 'fast' reaches the end
            fast =
            slow =

        # 'slow' is now just before the Nth node, remove it =

        return  # Return the new head of the list