docs: async def send_cred_def(self, s_id: str, revo: bool = True, rr_size: int = None) -> str:
          """
          Create a credential definition as Issuer, store it in its wallet, and send it to the ledger.
  
          Raise CorruptWallet for wallet not pertaining to current ledger, BadLedgerTxn on failure
          to send credential definition to ledger if need be, WalletState for closed wallet,
          or IndyError for any other failure to create and store credential definition in wallet.
  
          :param s_id: schema identifier
          :param revo: whether to support revocation for cred def
          :param rr_size: size of initial revocation registry (default as per RevRegBuilder.create_rev_reg()),
              if revocation supported
          :return: json credential definition as it appears on ledger
          """
  
          LOGGER.debug('Issuer.send_cred_def >>> s_id: %s, revo: %s, rr_size: %s', s_id, revo, rr_size)
  
          if not ok_schema_id(s_id):
              LOGGER.debug('Issuer.send_cred_def <!< Bad schema id %s', s_id)
              raise BadIdentifier('Bad schema id {}'.format(s_id))
  
          if not self.wallet.handle:
              LOGGER.debug('Issuer.send_cred_def <!< Wallet %s is closed', self.name)
              raise WalletState('Wallet {} is closed'.format(self.name))
  
          if not self.pool:
              LOGGER.debug('Issuer.send_cred_def <!< issuer %s has no pool', self.name)
              raise AbsentPool('Issuer {} has no pool: cannot send cred def'.format(self.name))
  
          rv_json = json.dumps({})
          schema_json = await self.get_schema(schema_key(s_id))
          schema = json.loads(schema_json)
  
          cd_id = cred_def_id(self.did, schema['seqNo'], self.pool.protocol)
          private_key_ok = True
          with CRED_DEF_CACHE.lock:
              try:
                  rv_json = await self.get_cred_def(cd_id)
                  LOGGER.info(
                      'Cred def on schema %s version %s already exists on ledger; Issuer %s not sending another',
                      schema['name'],
                      schema['version'],
                      self.name)
              except AbsentCredDef:
                  pass  # OK - about to create, store, and send it
  
              (cred_def_json, private_key_ok) = await self._create_cred_def(schema, json.loads(rv_json), revo)
  
              if not json.loads(rv_json):  # checking the ledger returned no cred def: send it
                  req_json = await ledger.build_cred_def_request(self.did, cred_def_json)
                  await self._sign_submit(req_json)
  
                  for _ in range(16):  # reasonable timeout
                      try:
                          rv_json = await self.get_cred_def(cd_id)  # adds to cache
                          break
                      except AbsentCredDef:
                          await asyncio.sleep(1)
                          LOGGER.info('Sent cred def %s to ledger, waiting 1s for its appearance', cd_id)
  
                  if not rv_json:
                      LOGGER.debug('Issuer.send_cred_def <!< timed out waiting on sent cred_def %s', cd_id)
                      raise BadLedgerTxn('Timed out waiting on sent cred_def {}'.format(cd_id))
  
                  if revo:  # create new rev reg for tag '0'
                      if self.rrbx:
                          (_, rr_size_suggested) = Tails.next_tag(self.dir_tails, cd_id)
                          self.rrb.mark_in_progress(rev_reg_id(cd_id, '0'), rr_size or rr_size_suggested)
  
                      await self._sync_revoc_for_issue(rev_reg_id(cd_id, '0'), rr_size)  # sync rev reg on tag '0'
  
          if revo and private_key_ok:
              for tag in [str(t) for t in range(1, int(Tails.next_tag(self.dir_tails, cd_id)[0]))]:  # '1' to next-1
                  await self._sync_revoc_for_issue(rev_reg_id(cd_id, tag), rr_size if tag == '0' else None)
  
          makedirs(join(self.dir_tails, cd_id), exist_ok=True)  # dir required for box id collection, revo or not
  
          LOGGER.debug('Issuer.send_cred_def <<< %s', rv_json)
          return rv_json