code: def validate_operation_args(operation: str) -> dict:
      valid_cmds = (
          "priority",
          "weight",
          "resource_pool",
          "ahead_of",
          "behind_of",
      )
      replacements = {
          "resource-pool": "resource_pool",
          "ahead-of": "ahead_of",
          "behind-of": "behind_of",
      }
      args = {}
      values = operation.split(".")
      if len(values) != 2:
          raise ValueError(
              f"Job {values[0]} and its operation have an invalid format. "
              f"Please ensure the update is formatted as <jobID>.<operation>=<value>."
          )
      args["job_id"] = values[0]
      operand = values[1].split("=")
      if len(operand) != 2:
          raise ValueError(
              f"The operation for job {values[0]} has invalid format. "
              f"Please ensure the operation is formatted as <operation>=<value>."
          )
  
      if (
          operand[0] not in valid_cmds
          and operand[0] not in replacements
      ):
          raise ValueError(
              f"Invalid operation {operand[0]} specified for job {values[0]}. "
              f"Supported commands include: {valid_cmds}."
          )
  
      args[replacements.get(operand[0], operand[0])] = operand[1]
  
      return args
  
file_path: determined/harness/determined/cli/job.py
imports: import datetime
  from argparse import ONE_OR_MORE, Namespace
  from typing import Any, List, Union
  from determined import cli
  from determined.cli import render
  from determined.common import api, util
  from determined.common.api import authentication, bindings
  from determined.common.declarative_argparse import Arg, Cmd, Group
  from determined.common.util import parse_protobuf_timestamp
label_desc: Use image node_id 7 for calling a global function with example usage: validate_operation_args(operation) and returns: args