def METHOD_NAME(self, key):
    """
    Fetch dotted key 'key' in jobspec for this job, fetching jobspec
    and eventlog (to apply jobspec-updates) if necessary.
    """
    if self.jobspec is None:
        lookup = flux.job.job_kvs_lookup(
            self.flux_handle, jobid=self.jobid, keys=["jobspec", "eventlog"]
        )
        self.jobspec = flux.job.JobspecV1(**lookup["jobspec"])
        self._apply_jobspec_updates(lookup["eventlog"])
    return self.jobspec.getattr(key)