<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_all_tasks(conf):
 """Returns a list with every task registred on Hamster. """


    db = HamsterDB(conf)

    fact_list = db.all_facts_id
    security_days = int(conf.get_option('tasks.security_days'))
    today = datetime.today()

    tasks = {}

    for fact_id in fact_list:
        ht = HamsterTask(fact_id, conf, db)
        if ht.end_time:
            end_time = ht.get_object_dates()[1]
            if today - timedelta(security_days) <= end_time:
                rt = ht.get_remote_task()
                tasks[rt.task_id] = rt

    db.close_connection()

    print 'Obtained %d tasks' % len(tasks)
    return tasks