code: def is_serializable_value(value):
      """Returns whether a protobuf Value will be serializable by MessageToJson.
  
      The json_format documentation states that "attempting to serialize NaN or
      Infinity results in error."
  
      https://protobuf.dev/reference/protobuf/google.protobuf/#value
  
      Args:
        value: A value of type protobuf.Value.
  
      Returns:
        True if the Value should be serializable without error by MessageToJson.
        False, otherwise.
      """
      if not value.HasField("number_value"):
          return True
  
      number_value = value.number_value
      return not math.isnan(number_value) and not math.isinf(
          number_value
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: is_serializable_value(value) and returns: unknown, True