code: def get_request_states(request, relation='ceph'):
      
      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
docs: 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