input: Write a python function to connect to an NFC tag and read/write data using the nfc library.
  assert read_write_nfc_tag() == 'Hello World!'
output: import nfc
  import nfc.clf
  
  def read_write_nfc_tag():
      def on_connect(tag):
          tag.ndef.message = nfc.ndef.Message(nfc.ndef.TextRecord("Hello World!"))
          return False
  
      clf = nfc.ContactlessFrontend('usb')
      try:
          clf.connect(rdwr={'on-connect': on_connect})
      finally:
          clf.close()
  
      def on_connect(tag):
          return tag.ndef.message.pretty()
  
      clf.connect(rdwr={'on-connect': on_connect})
      message = clf.connect(rdwr={'on-connect': on_connect})
      clf.close()
      return message