code: def get_activity_by_id(self, activity_id):
          
  
          columns = 'name, category_id'
  
          query = "SELECT %s FROM activities WHERE id = %s"
          result = self._query(query % (columns, activity_id))
  
          if result:
              return result[0]  # there only one fact with the id
          else:
              raise NoHamsterData('activities', activity_id)
docs: Obtains activity data by it's id.
  
          As the activity is unique, it returns a tuple like:
          (name, category_id). If there is no activity with
          id == activity_id, a NoHamsterData exception will be raise