code: def print_ll(head):
      """Prints a linked list in this format: x -> y -> z. Used for testing."""
      res = []
  
      while head != None:
          res.append(str(head.val))
          head = head.next
  
      print(" -> ".join(res))
  
label_desc: Use image node_id 2 for calling a global function with example usage: print_ll(head) without return types