code: def _search_jobs(self, flow_name, run_id, user):
      if user is None:
          regex = "-{flow_name}-".format(flow_name=flow_name)
      else:
          regex = "{user}-{flow_name}-".format(
              user=user, flow_name=flow_name
          )
      jobs = []
      for job in self._client.unfinished_jobs():
          if regex in job["jobName"]:
              jobs.append(job["jobId"])
      if run_id is not None:
          run_id = run_id[run_id.startswith("sfn-") and len("sfn-") :]
      for job in self._client.describe_jobs(jobs):
          parameters = job["parameters"]
          match = (
              (user is None or parameters["metaflow.user"] == user)
              and (parameters["metaflow.flow_name"] == flow_name)
              and (
                  run_id is None
                  or parameters["metaflow.run_id"] == run_id
              )
          )
          if match:
              yield job
  
imports: import atexit
  import copy
  import json
  import os
  import select
  import shlex
  import time
  from metaflow import util
  from metaflow.plugins.datatools.s3.s3tail import S3Tail
  from metaflow.plugins.aws.aws_utils import sanitize_batch_tag
  from metaflow.exception import MetaflowException
  from metaflow.metaflow_config import SERVICE_INTERNAL_URL, DATATOOLS_S3ROOT, DATASTORE_SYSROOT_S3, DEFAULT_METADATA, SERVICE_HEADERS, BATCH_EMIT_TAGS, CARD_S3ROOT, S3_ENDPOINT_URL, DEFAULT_SECRETS_BACKEND_TYPE, AWS_SECRETS_MANAGER_DEFAULT_REGION, S3_SERVER_SIDE_ENCRYPTION
  from metaflow.metaflow_config_funcs import config_values
  from metaflow.mflog import export_mflog_env_vars, bash_capture_logs, tail_logs, BASH_SAVE_LOGS
  from .batch_client import BatchClient
label_desc: Use image node_id 3 for calling the Batch obj's underlying member method code with example usage: obj._search_jobs(flow_name, run_id, user) without return types