<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_tags_by_fact_id(self, fact_id):
 """ Obtains the tags associated by a fact_id. This function returns a list of the tags name associated to a fact, such as ['foo', 'bar', 'eggs']. If the fact has no tags, it will return a empty list. If there are no fact with id == fact_id, a NoHamsterData exception will be raise """

        if not fact_id in self.all_facts_id:
            raise NoHamsterData('facts', fact_id)

        query = "SELECT tag_id FROM fact_tags WHERE fact_id = %s"
        return [self.tags[row[0]] for row in self._query(query % fact_id)]