def __init__(self, base_dir: str, cd_id: str, tag: str = None):
if tag is None:<EOL><INDENT>self._rr_id = Tails.current_rev_reg_id(base_dir, cd_id)<EOL><DEDENT>else:  <EOL><INDENT>self._rr_id = rev_reg_id(cd_id, tag)<EOL>if self._rr_id not in [basename(f) for f in Tails.links(base_dir)]:<EOL><INDENT>raise AbsentTails('<STR_LIT>'.format(cd_id, tag))<EOL><DEDENT><DEDENT>path_link = join(Tails.dir(base_dir, self._rr_id), self._rr_id)<EOL>if not islink(path_link):<EOL><INDENT>raise AbsentTails('<STR_LIT>'.format(path_link, self._rr_id))<EOL><DEDENT>path_tails = Tails.linked(base_dir, self._rr_id)<EOL>if not isfile(path_tails):<EOL><INDENT>raise AbsentTails('<STR_LIT>'.format(path_tails, self._rr_id))<EOL><DEDENT>self._tails_cfg_json = json.dumps({<EOL>'<STR_LIT>': dirname(path_tails),<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:file>': basename(path_tails)<EOL>})<EOL>self._reader_handle = None<EOL>
Initialize programmatic association between revocation registry identifier
(on credential definition on input identifier plus tag, default most recent),
and tails file, via symbolic link.

Raise AbsentTails if (rev reg id) symbolic link or (tails hash) tails file not present.

:param base_dir: base directory for tails files, thereafter split by cred def id
:param cd_id: credential definition identifier of interest
:param tag: revocation registry identifier tag of interest, default to most recent