code: def GetSoleValue(
      inputs: Mapping[str, Sequence[Any]], label: str, strict=True
  ) -> Any:
      """Helper method for retrieving a sole labeled input.
  
      Args:
        inputs: Dict from label to a value list.
        label: Label of the value to retrieve.
        strict: If true, exactly one value should exist for label.
  
      Returns:
        A sole labeled value.
  
      Raises:
        ValueError: If there is no/multiple input associated with the label.
      """
      values = GetValues(inputs, label)
      if len(values) > 1:
          raise ValueError(
              "There should not be more than one value for label {}".format(
                  label
              )
          )
      if strict:
          if len(values) != 1:
              raise ValueError(
                  "There should be one and only one value for label {}".format(
                      label
                  )
              )
      else:
          if not values:
              return None
      return values[0]
  
imports: import inspect
  import sys
  from typing import Any, Callable, Sequence, Mapping
label_desc: Use image node_id 2 for calling a global function with example usage: GetSoleValue(inputs, label, strict) and returns: values, None