title: Trying to understand a snippet
body: <p>I'm trying to understand the following IF statement and what <code>res</code> does.</p>
  
  <pre><code>   if sentence is not None:
                  # gps successfully parsed a message from module
                  # see if we have valid coordinates
                  res = check_for_valid_coordinates(gps)
  </code></pre>
  
  <p>Given below is the full code. Does it just run the function? </p>
  
  <pre><code>GPS_TIMEOUT_SECS=10
  # init I2C to P21/P22
  i2c = machine.I2C(0, mode=I2C.MASTER, pins=('P22', 'P21'))
  # write to address of GPS
  GPS_I2CADDR = const(0x10)
  raw = bytearray(1)
  i2c.writeto(GPS_I2CADDR, raw)
  # create MicropyGPS instance
  gps = MicropyGPS()
  # store results here.
  last_data = {}
  print("Start reading GPS data...")
  def check_for_valid_coordinates(gps):
      if gps.satellite_data_updated() and gps.valid:
          last_data['date'] = gps.date_string("long")
          last_data['latitude'] = gps.latitude_string()
          last_data['longitude'] = gps.longitude_string()
  while True:
      # read some data from module via I2C
      raw = i2c.readfrom(GPS_I2CADDR, 16)
      # feed into gps object
      for b in raw:
          sentence = gps.update(chr(b))
          if sentence is not None:
              # gps successfully parsed a message from module
              # see if we have valid coordinates
              res = check_for_valid_coordinates(gps)
  print("Finished.")
  if 'date' in last_data:
      print("@ ", last_data['date'])
  if 'latitude' in last_data and 'longitude' in last_data:
      print("&gt; ", last_data['latitude'], " ", last_data['longitude'])
  i2c.deinit()
  </code></pre>
  
  <p>Any help is appreciated. Thanks.</p>