code: def getIntersectionNode(self, headA, headB):
      """
      :type head1, head1: ListNode
      :rtype: ListNode
      """
      # two points
      if not headA or not headB:
          return None
      a, b = headA, headB
      ans = None
      while a or b:
          if not a:
              a = headB
          if not b:
              b = headA
          if a == b and not ans:
              ans = a
          a, b = a.next, b.next
      return ans
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.getIntersectionNode(headA, headB) and returns: ans, None