def list_jobs(
        self,
        created_before: datetime.datetime | datetime.date | None = None,
        created_after: datetime.datetime | datetime.date | None = None,
        has_labels: dict[str, str] | None = None,
        execution_states: set[quantum.ExecutionStatus.State] | None = None,
    ) -> Sequence[AbstractLocalJob]:
        """Returns the list of jobs for this program.

        Args:
            created_after: retrieve jobs that were created after this date
                or time.
            created_before: retrieve jobs that were created before this date
                or time.
            has_labels: retrieve jobs that have labels on them specified by
                this dict. If the value is set to `*`, filters having the label
                regardless of the label value will be filtered. For example, to
                query programs that have the shape label and have the color
                label with value red can be queried using

                {'color': 'red', 'shape':'*'}

            execution_states: retrieve jobs that have an execution state  that
                is contained in `execution_states`. See
                `quantum.ExecutionStatus.State` enum for accepted values.
        """
        job_list = []
        for job in self._jobs.values():
            if created_before and job.create_time() > created_before:
                continue
            if created_after and job.create_time() < created_after:
                continue
            if execution_states:
                if job.execution_status() not in execution_states:
                    continue
            if has_labels:
                job_labels = job.labels()
                if not all(
                    label in job_labels and job_labels[label] == has_labels[label]
                    for label in has_labels
                ):
                    continue
            job_list.append(job)
        return job_list
Returns the list of jobs for this program.

        Args:
            created_after: retrieve jobs that were created after this date
                or time.
            created_before: retrieve jobs that were created before this date
                or time.
            has_labels: retrieve jobs that have labels on them specified by
                this dict. If the value is set to `*`, filters having the label
                regardless of the label value will be filtered. For example, to
                query programs that have the shape label and have the color
                label with value red can be queried using

                {'color': 'red', 'shape':'*'}

            execution_states: retrieve jobs that have an execution state  that
                is contained in `execution_states`. See
                `quantum.ExecutionStatus.State` enum for accepted values.
        
cirq-google/cirq_google/engine/abstract_local_program.py