code: def cred_def_id2seq_no(cd_id: str) -> int:
      
  
      if ok_cred_def_id(cd_id):
          return int(cd_id.split(':')[3])  # sequence number is token at 0-based position 3
      raise BadIdentifier('Bad credential definition identifier {}'.format(cd_id))
docs: Given a credential definition identifier, return its schema sequence number.
      Raise BadIdentifier on input that is not a credential definition identifier.
  
      :param cd_id: credential definition identifier
      :return: sequence number