code: def get_tile_image_by_gid(self, gid):
          
          try:
              assert (int(gid) >= 0)
              return self.images[gid]
          except TypeError:
              msg = "GIDs must be expressed as a number.  Got: {0}"
              logger.debug(msg.format(gid))
              raise TypeError
          except (AssertionError, IndexError):
              msg = "Coords: ({0},{1}) in layer {2} has invalid GID: {3}"
              logger.debug(msg.format(gid))
              raise ValueError
docs: Return the tile image for this location
  
          :param gid: GID of image
          :rtype: surface if found, otherwise ValueError