def METHOD_NAME(job_client, parent, job_spec):
  create_hyperparameter_tuning_job_fn = None
  try:
    create_hyperparameter_tuning_job_fn = (
        job_client.create_hyperparameter_tuning_job(
            parent=parent, hyperparameter_tuning_job=job_spec
        )
    )
  except (ConnectionError, RuntimeError) as err:
    error_util.exit_with_internal_error(err.args[0])
  return create_hyperparameter_tuning_job_fn