docs: async def _create_cred_def(self, schema: dict, ledger_cred_def: dict, revo: bool) -> (str, bool):
          """
          Create credential definition in wallet as part of the send_cred_def() sequence.
          Return whether the private key for the cred def is OK to continue with the sequence,
          propagating the cred def and revocation registry info to the ledger.
  
          :param schema: schema on which to create cred def
          :param ledger_cred_def: credential definition as ledger has it (typically, None)
          :param revo: whether cred def supports revocation
          :return: cred def json and whether local cred def private key is OK, hence cred def is OK to send to the ledger
          """
  
          LOGGER.debug(
              'Issuer._create_cred_def >>> schema: %s, ledger_cred_def: %s, revo: %s',
              schema,
              ledger_cred_def,
              revo)
  
          cred_def_json = '{}'
          private_key_ok = True
          try:
              (_, cred_def_json) = await anoncreds.issuer_create_and_store_credential_def(
                  self.wallet.handle,
                  self.did,  # issuer DID
                  json.dumps(schema),
                  self.pool.protocol.cd_id_tag(False),  # expect only one cred def per schema and issuer
                  'CL',
                  json.dumps({'support_revocation': revo}))
              if ledger_cred_def:
                  private_key_ok = False
                  LOGGER.warning(
                      'New cred def on %s in wallet shadows existing one on ledger: private key not usable',
                      cred_def_id(self.did, schema['seqNo'], self.pool.protocol))
                      # carry on though, this anchor may have other capacities so public key may be good enough
          except IndyError as x_indy:
              if x_indy.error_code == ErrorCode.AnoncredsCredDefAlreadyExistsError:
                  if ledger_cred_def:
                      LOGGER.info(
                          'Issuer wallet %s reusing existing cred def on schema %s version %s',
                          self.name,
                          schema['name'],
                          schema['version'])
                  else:
                      LOGGER.debug('Issuer._create_cred_def <!< corrupt wallet %s', self.name)
                      raise CorruptWallet('Corrupt Issuer wallet {} has cred def on schema {} not on ledger'.format(
                          self.name,
                          schema['id']))
              else:
                  LOGGER.debug(
                      'Issuer._create_cred_def <!< cannot store cred def in wallet %s: indy error code %s',
                      self.name,
                      x_indy.error_code)
                  raise
  
          rv = (cred_def_json, private_key_ok)
          LOGGER.debug('Issuer._create_cred_def <<< %s', rv)
          return rv