code: def dir(base_dir: str, rr_id: str) -> str:
          
  
          LOGGER.debug('Tails.dir >>> base_dir: %s, rr_id: %s', base_dir, rr_id)
  
          if not ok_rev_reg_id(rr_id):
              LOGGER.debug('Tails.dir <!< Bad rev reg id %s', rr_id)
              raise BadIdentifier('Bad rev reg id {}'.format(rr_id))
  
          rv = join(base_dir, rev_reg_id2cred_def_id(rr_id))
          LOGGER.debug('Tails.dir <<< %s', rv)
          return rv
docs: Return correct subdirectory of input base dir for artifacts corresponding to input rev reg id.
  
          :param base_dir: base directory for tails files, thereafter split by cred def id
          :param rr_id: rev reg id