def _check_if_unsupported_args_are_present(args: Mapping[str, Any],
                                           supported_args: Collection[str],
                                           job_type: str) -> None:
  supported_args = set(supported_args)
  unsupported_args = set(args.keys()) - supported_args
  if unsupported_args:
    raise ValueError(
        f'Arguments {unsupported_args!r} are not supported by {job_type}. Only '
        f'{supported_args!r} are allowed.')