code: def box_ids(briefs: Union[dict, Sequence[dict]], cred_ids: Union[Sequence[str], str] = None) -> dict:
      
  
      rv = {}
      for brief in iter_briefs(briefs):
          cred_info = brief.get('cred_info', {}) or brief  # briefs could be cred-infos or cred-briefs
          cred_id = cred_info['referent']
          if ((cred_id not in rv) and (not cred_ids or cred_id in [cred_ids, [cred_ids]][isinstance(cred_ids, str)])):
              rv[cred_id] = {
                  'schema_id': cred_info['schema_id'],
                  'cred_def_id': cred_info['cred_def_id'],
                  'rev_reg_id': cred_info['rev_reg_id']
              }
  
      return rv
docs: Given one or more cred-briefs/cred-infos, and an optional sequence of credential identifiers
      (aka wallet cred ids, referents; specify None to include all), return dict mapping each
      credential identifier to a box ids structure (i.e., a dict specifying its corresponding
      schema identifier, credential definition identifier, and revocation registry identifier,
      the latter being None if cred def does not support revocation).
  
      :param briefs: cred-brief/cred-info, sequence thereof, or cred-brief-dict
      :param cred_ids: credential identifier or sequence thereof for which to find corresponding
          schema identifiers, None for all
      :return: dict mapping each credential identifier to its corresponding box ids (empty dict if
          no matching credential identifiers present)