<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_request_states(request, relation='ceph'):
 """Return a dict of requests per relation id with their corresponding completion state. This allows a charm, which has a request for ceph, to see whether there is an equivalent request already being processed and if so what state that request is in. @param request: A CephBrokerRq object """

    complete = []
    requests = {}
    for rid in relation_ids(relation):
        complete = False
        previous_request = get_previous_request(rid)
        if request == previous_request:
            sent = True
            complete = is_request_complete_for_rid(previous_request, rid)
        else:
            sent = False
            complete = False

        requests[rid] = {
            'sent': sent,
            'complete': complete,
        }

    return requests