'Implements yaml.safe_load(), except using our custom loader class.'

def _safe_load(self, stream, file_name=None):

    loader = AnsibleLoader(stream, file_name, self._vault.secrets)
    try:
        return loader.get_single_data()
    finally:
        try:
            loader.dispose()
        except AttributeError:
            pass
