def METHOD_NAME(self, var_name):
    context = self._get_vault_variables_and_record()
    known_secret_specs_by_name = get_known_secret_specs_by_name()
    if var_name in known_secret_specs_by_name:
        legacy_namespace = known_secret_specs_by_name[var_name].legacy_namespace
        if legacy_namespace in context and var_name in context[legacy_namespace]:
            return context[legacy_namespace][var_name]
    return context[var_name]