code: def signRequest(self,
                      req: Request,
                      identifier: Identifier=None) -> Request:
          
  
          idr = self.requiredIdr(idr=identifier or req._identifier)
          # idData = self._getIdData(idr)
          req._identifier = idr
          req.reqId = req.gen_req_id()
          # req.digest = req.getDigest()
          # QUESTION: `self.ids[idr]` would be overwritten if same identifier
          # is used to send 2 requests, why is `IdData` persisted?
          # self.ids[idr] = IdData(idData.signer, req.reqId)
          req.signature = self.signMsg(msg=req.signingPayloadState(identifier=idr),
                                       identifier=idr,
                                       otherIdentifier=req.identifier)
  
          return req
docs: Signs request. Modifies reqId and signature. May modify identifier.
  
          :param req: request
          :param requestIdStore: request id generator
          :param identifier: signer identifier
          :return: signed request