class_docstr: PredictionTaskSchema
class_docstr_tok: ["PredictionTaskSchema"]
code: def actual_instance_must_validate_oneof(cls, v):
      instance = PredictionTaskSchema.construct()
      error_messages = []
      match = 0
      # validate data type: PredictionTaskSchemaSimple
      if not isinstance(v, PredictionTaskSchemaSimple):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionTaskSchemaSimple`"
          )
      else:
          match += 1
      # validate data type: PredictionTaskSchemaKeypoint
      if not isinstance(v, PredictionTaskSchemaKeypoint):
          error_messages.append(
              f"Error! Input type `{type(v)}` is not `PredictionTaskSchemaKeypoint`"
          )
      else:
          match += 1
      if match > 1:
          # more than 1 match
          raise ValueError(
              "Multiple matches found when setting `actual_instance` in PredictionTaskSchema with oneOf schemas: PredictionTaskSchemaKeypoint, PredictionTaskSchemaSimple. Details: "
              + ", ".join(error_messages)
          )
      elif match == 0:
          # no match
          raise ValueError(
              "No match found when setting `actual_instance` in PredictionTaskSchema with oneOf schemas: PredictionTaskSchemaKeypoint, PredictionTaskSchemaSimple. 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_task_schema_keypoint import PredictionTaskSchemaKeypoint
  from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple import PredictionTaskSchemaSimple
  from typing import Any, List
  from pydantic import StrictStr, Field, Extra
label_desc: Use image node_id 2 for calling the PredictionTaskSchema obj's underlying member method code with example usage: obj.actual_instance_must_validate_oneof(cls, v) and returns: v