def validate_reference(self, reference: ReferenceDefinitionType) -> Optional[Path]:
if reference is not None:<EOL><INDENT>if isinstance(reference, bytes):<EOL><INDENT>reference = reference.decode("<STR_LIT:utf-8>")<EOL><DEDENT>try:<EOL><INDENT>return Path(reference)<EOL><DEDENT>except TypeError:<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT><DEDENT>return None<EOL>
Converts reference to :class:`Path <pathlib.Path>`

        :raise ValueError: If ``reference`` can't be converted to :class:`Path <pathlib.Path>`.