class_docstr: PredictionSingleton
code: def actual_instance_must_validate_oneof(cls, v):
      instance = PredictionSingleton.construct()
      error_messages = []
      match = 0
      # validate data type: PredictionSingletonClassification
      if not isinstance(v, PredictionSingletonClassification):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionSingletonClassification`"
          )
      else:
          match += 1
      # validate data type: PredictionSingletonObjectDetection
      if not isinstance(v, PredictionSingletonObjectDetection):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionSingletonObjectDetection`"
          )
      else:
          match += 1
      # validate data type: PredictionSingletonSemanticSegmentation
      if not isinstance(v, PredictionSingletonSemanticSegmentation):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionSingletonSemanticSegmentation`"
          )
      else:
          match += 1
      # validate data type: PredictionSingletonInstanceSegmentation
      if not isinstance(v, PredictionSingletonInstanceSegmentation):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionSingletonInstanceSegmentation`"
          )
      else:
          match += 1
      # validate data type: PredictionSingletonKeypointDetection
      if not isinstance(v, PredictionSingletonKeypointDetection):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionSingletonKeypointDetection`"
          )
      else:
          match += 1
      if match > 1:
          # more than 1 match
          raise ValueError(
              "Multiple matches found when setting `actual_instance` in PredictionSingleton with oneOf schemas: PredictionSingletonClassification, PredictionSingletonInstanceSegmentation, PredictionSingletonKeypointDetection, PredictionSingletonObjectDetection, PredictionSingletonSemanticSegmentation. Details: "
              + ", ".join(error_messages)
          )
      elif match == 0:
          # no match
          raise ValueError(
              "No match found when setting `actual_instance` in PredictionSingleton with oneOf schemas: PredictionSingletonClassification, PredictionSingletonInstanceSegmentation, PredictionSingletonKeypointDetection, PredictionSingletonObjectDetection, PredictionSingletonSemanticSegmentation. Details: "
              + ", ".join(error_messages)
          )
      else:
          return v
  
imports: from __future__ import annotations
  from inspect import getfullargspec
  import json
  import pprint
  import re
  from typing import Any, List, Optional
  from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
  from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification import PredictionSingletonClassification
  from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation import PredictionSingletonInstanceSegmentation
  from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection import PredictionSingletonKeypointDetection
  from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection import PredictionSingletonObjectDetection
  from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation import PredictionSingletonSemanticSegmentation
  from typing import Any, List
  from pydantic import StrictStr, Field, Extra
label_desc: Use image node_id 2 for calling the PredictionSingleton obj's underlying member method code with example usage: obj.actual_instance_must_validate_oneof(cls, v) and returns: v