human
Complete this python program:
def budget():
assistant
#Here is the Python program you requested.

    """RESTful CRUD controller
    """
    def prep(r):
        if ((r.method == 'timeplot') and (r.get_vars.get('component') == 'allocation')):
            query = (FS('allocation.start_date') != None)
            r.resource.add_component_filter('allocation', query)
        return True
    s3.prep = prep
    return s3_rest_controller(rheader=s3db.budget_rheader)