code: def ValidateOnlyOneSpecified(
      inputs: Mapping[str, Any],
      keys: Sequence[str],
      allow_missing: bool = False,
  ) -> bool:
      """Check whether only one of given keys are specified in the input.
  
      NOTE: False-equivalent values like 0, '' are regarded as not specified.
  
      Args:
        inputs: input dictionary.
        keys: keys to check the existence of values.
        allow_missing: If False, one of keys should be set in inputs.
  
      Returns:
        True if one of the key has a value.
      Raises:
        ValueError: if none of the keys have non empty value in the input.
      """
      counter = 0
      for key in keys:
          counter += int(
              bool(value_utils.GetSoleValue(inputs, key, strict=False))
          )
  
      keys_str = ", ".join(keys)
      if counter > 1:
          raise ValueError(
              f"At most one of {keys_str} should be supplied in the input."
          )
      elif counter == 0 and not allow_missing:
          raise ValueError(
              f"One of {keys_str} should be supplied in the input."
          )
  
      return counter > 0
  
file_path: tfx/tfx/components/transform/executor_utils.py
imports: import functools
  import os
  from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence
  from absl import logging
  from tfx import types
  from tfx.components.transform import labels
  from tfx.components.util import value_utils
  from tfx.proto import transform_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
label_desc: Use image node_id 2 for calling a global function with example usage: ValidateOnlyOneSpecified(inputs, keys, allow_missing) and returns: unknown