code: def log(
      batch_id: int,
      job_id: int,
      container: Ann[
          Optional[JobContainer],
          Opt(help="Container name of the desired job"),
      ] = None,
      output: StructuredFormatOption = StructuredFormat.YAML,
  ):
      """Get the log for the job with id JOB_ID in the batch with id BATCH_ID."""
      from hailtop.batch_client.client import (
          BatchClient,
      )  # pylint: disable=import-outside-toplevel
  
      with BatchClient("") as client:
          maybe_job = get_job_if_exists(client, batch_id, job_id)
          if maybe_job is None:
              print(
                  f"Job with ID {job_id} on batch {batch_id} not found"
              )
              return
  
          if container:
              print(maybe_job.container_log(container))
          else:
              print(make_formatter(output)(maybe_job.log()))
  
imports: import asyncio
  from enum import Enum
  import typer
  from typer import Option, Argument
  import json
  from typing import Optional, List, Annotated, cast, Dict, Any
  from .None import list_batches
  from .None import billing
  from .initialize import async_basic_initialize
  from .None import submit
  from .batch_cli_utils import get_batch_if_exists, get_job_if_exists, make_formatter, StructuredFormat, StructuredFormatOption, StructuredFormatPlusText, StructuredFormatPlusTextOption, ExtendedOutputFormat, ExtendedOutputFormatOption
label_desc: Use image node_id 5 for calling a global function with example usage: log(batch_id, job_id, container, output) without return types